Skip to content

Commit

Permalink
Merge pull request #325 from crossroads/master
Browse files Browse the repository at this point in the history
[Release] Goodcity v0.17.8
  • Loading branch information
patrixr authored Jun 12, 2020
2 parents cd0925a + fc5f4b6 commit 05c5714
Show file tree
Hide file tree
Showing 12 changed files with 179 additions and 87 deletions.
17 changes: 15 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ jobs:

ios_build_and_deploy:
macos:
xcode: "10.1.0"
xcode: "11.0.0"
working_directory: ~/code
shell: /bin/bash --login -eo pipefail
environment:
Expand All @@ -209,6 +209,19 @@ jobs:

steps:
- checkout
- run:
name: install [email protected]
command: |
set +e
touch $BASH_ENV
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
echo nvm install 6.16.0 >> $BASH_ENV
echo nvm alias default 6.16.0 >> $BASH_ENV
- run:
name: verify node version
command: node --version
- restore-cache: *restore-ios-yarn-cache
- run: *yarn
- save-cache: *save-ios-yarn-cache
Expand Down Expand Up @@ -301,7 +314,7 @@ jobs:
www_deploy:
<<: *defaults
docker:
- image: circleci/ruby:2.5.1-node
- image: circleci/ruby:2.5.5
steps:
- restore-cache: *restore-repo-cache
- restore-cache: *restore-bundler-cache
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Forward release notes

on:
pull_request:
types: [closed]
branches:
- live

jobs:
release-notes:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Generate and email notes
run: npx @goodcity/release-notes --email-to "[email protected],[email protected],[email protected]" --head ${{github.event.pull_request.head.sha}} --base ${{github.event.pull_request.base.sha}} --email-subject "🚀 Donor App Release 🚀"
env:
JIRA_USERNAME: ${{secrets.jira_username}}
JIRA_PASSWORD: ${{secrets.jira_password}}
SENDGRID_API_KEY: ${{secrets.sendgrid_api_key}}
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.5.3
ruby-2.5.5
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ GEM
os (1.0.1)
plist (3.5.0)
public_suffix (2.0.5)
rake (12.3.1)
rake (12.3.3)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
Expand Down
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"ember-qunit-notifications": "0.1.0",
"jquery-mockjax": "2.0.1",
"active-model-adapter": "2.1.1",
"offline": "^0.7.19"
"offline": "^0.7.19",
"blueimp-load-image": "^5.12.0"
},
"resolutions": {
"jquery-placeholder": "~2.3.1",
Expand Down
2 changes: 1 addition & 1 deletion cordova/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<allow-intent href="http://crossroads.uservoice.com/*"/>
<allow-intent href="https://crossroads.uservoice.com/*"/>
<allow-intent href="https://checkout.paypal.com/*"/>
<engine name="ios" spec="https://github.com/apache/cordova-ios.git#4.5.5" />
<engine name="ios" spec="~5.0.0" />
<engine name="android" spec="~8.0.0"/>
<engine name="windows" spec="~4.3.1"/>
<plugin name="cordova-plugin-statusbar" spec="~2.1.1"/>
Expand Down
84 changes: 50 additions & 34 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,69 +1,85 @@
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var webRelease = process.env.EMBER_CLI_CORDOVA === '0' && ['production', 'staging'].indexOf(process.env.EMBER_ENV) !== -1;
var EmberApp = require("ember-cli/lib/broccoli/ember-app");
var webRelease =
process.env.EMBER_CLI_CORDOVA === "0" &&
["production", "staging"].indexOf(process.env.EMBER_ENV) !== -1;

module.exports = function(defaults) {
var app = new EmberApp(defaults, {
sourcemaps: {
enabled: true,
extensions: ['js']
extensions: ["js"]
},
minifyJS: {
options: {
exclude: ["**/goodcity.js"]
}
},
fingerprint: {
extensions: ['js','css', 'png', 'jpg', 'gif', 'map'],
exclude: ['images/donor.png'],
extensions: ["js", "css", "png", "jpg", "gif", "map"],
exclude: ["images/donor.png"],
enabled: webRelease
},
gzip: {
keepUncompressed: true,
extensions: ['js', 'css', 'map', 'ttf', 'ott', 'eot', 'svg'],
extensions: ["js", "css", "map", "ttf", "ott", "eot", "svg"],
enabled: webRelease
}
});

app.import('bower_components/blueimp-file-upload/js/vendor/jquery.ui.widget.js');
app.import('bower_components/blueimp-file-upload/js/jquery.iframe-transport.js');
app.import('bower_components/blueimp-file-upload/js/jquery.fileupload.js');
app.import('bower_components/cloudinary/js/load-image.min.js');
app.import('bower_components/cloudinary/js/canvas-to-blob.min.js');
app.import('bower_components/blueimp-file-upload/js/jquery.fileupload-process.js');
app.import('bower_components/blueimp-file-upload/js/jquery.fileupload-image.js');
app.import('bower_components/blueimp-file-upload/js/jquery.fileupload-validate.js');
app.import('bower_components/cloudinary/js/jquery.cloudinary.js');
app.import(
"bower_components/blueimp-file-upload/js/vendor/jquery.ui.widget.js"
);
app.import(
"bower_components/blueimp-file-upload/js/jquery.iframe-transport.js"
);
app.import("bower_components/blueimp-file-upload/js/jquery.fileupload.js");
app.import("bower_components/blueimp-load-image/js/load-image.all.min.js");
app.import("bower_components/cloudinary/js/canvas-to-blob.min.js");
app.import(
"bower_components/blueimp-file-upload/js/jquery.fileupload-process.js"
);
app.import(
"bower_components/blueimp-file-upload/js/jquery.fileupload-image.js"
);
app.import(
"bower_components/blueimp-file-upload/js/jquery.fileupload-validate.js"
);
app.import("bower_components/cloudinary/js/jquery.cloudinary.js");

app.import('bower_components/moment/moment.js');
app.import('bower_components/moment/locale/zh-tw.js');
app.import('bower_components/pickadate/lib/picker.js');
app.import('bower_components/pickadate/lib/picker.date.js');
app.import('bower_components/pickadate/lib/picker.time.js');
app.import("bower_components/moment/moment.js");
app.import("bower_components/moment/locale/zh-tw.js");
app.import("bower_components/pickadate/lib/picker.js");
app.import("bower_components/pickadate/lib/picker.date.js");
app.import("bower_components/pickadate/lib/picker.time.js");

app.import("bower_components/pickadate/lib/themes/default.css");
app.import("bower_components/pickadate/lib/themes/default.date.css");
app.import("bower_components/pickadate/lib/themes/default.time.css");

// please include individual foundation js as needed
// tabs js if included throws error on keypress when tab has focus
app.import('bower_components/foundation/js/foundation/foundation.js');
app.import('bower_components/foundation/js/foundation/foundation.offcanvas.js');
app.import('bower_components/foundation/js/foundation/foundation.reveal.js');
app.import('bower_components/foundation/js/foundation/foundation.joyride.js');
app.import('bower_components/foundation/js/foundation/foundation.topbar.js');
app.import("bower_components/foundation/js/foundation/foundation.js");
app.import(
"bower_components/foundation/js/foundation/foundation.offcanvas.js"
);
app.import("bower_components/foundation/js/foundation/foundation.reveal.js");
app.import("bower_components/foundation/js/foundation/foundation.joyride.js");
app.import("bower_components/foundation/js/foundation/foundation.topbar.js");

// app.import('bower_components/fastclick/lib/fastclick.js');
app.import('bower_components/jquery-placeholder/jquery.placeholder.js');
app.import('bower_components/jquery.cookie/jquery.cookie.js');
app.import('bower_components/modernizr/modernizr.js');
app.import('bower_components/socket.io-client/socket.io.js');
app.import('bower_components/braintree-web/dist/braintree.js');
app.import("bower_components/jquery-placeholder/jquery.placeholder.js");
app.import("bower_components/jquery.cookie/jquery.cookie.js");
app.import("bower_components/modernizr/modernizr.js");
app.import("bower_components/socket.io-client/socket.io.js");
app.import("bower_components/braintree-web/dist/braintree.js");

app.import('bower_components/lightgallery/light-gallery/css/lightGallery.css');
app.import('bower_components/lightgallery/light-gallery/js/lightGallery.js');
app.import('bower_components/lightgallery/light-gallery/img/loading.gif', {
destDir: '/img'
app.import(
"bower_components/lightgallery/light-gallery/css/lightGallery.css"
);
app.import("bower_components/lightgallery/light-gallery/js/lightGallery.js");
app.import("bower_components/lightgallery/light-gallery/img/loading.gif", {
destDir: "/img"
});

return app.toTree();
Expand Down
16 changes: 13 additions & 3 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
default_platform :ios

class FastlaneCore::Shell
def error(message)
UI.user_error!(message)
end
end

def xsh(cmd)
sh cmd, error_callback: -> (err) { UI.user_error!(err) }
end

platform :ios do

before_all do
Expand All @@ -23,7 +33,7 @@ platform :ios do
keychain_password: ENV['KEYCHAIN_PWD']
)
unlock_keychain(path:"default_keychain", password:ENV['KEYCHAIN_PWD'])
sh "security set-keychain-settings -t 3600 -l ~/Library/Keychains/default_keychain-db"
xsh "security set-keychain-settings -t 3600 -l ~/Library/Keychains/default_keychain-db"
end

desc "Generate staging build (just upload to TestFairy)"
Expand All @@ -36,7 +46,7 @@ platform :ios do
lane :production do
raise_if_no_env_var(["APP_VERSION", "PILOT_USERNAME", "PILOT_IPA", "PILOT_TESTER_EMAIL", "ITUNESCONNECT_PASSWORD"])
version_number = ENV["APP_VERSION"]
sh %{ source ~/.circlerc; bundle exec fastlane fastlane-credentials add --username $PILOT_USERNAME --password $ITUNESCONNECT_PASSWORD }
xsh %{ source ~/.circlerc; bundle exec fastlane fastlane-credentials add --username $PILOT_USERNAME --password $ITUNESCONNECT_PASSWORD }
latest_testflight_build_number(version: version_number, username: ENV['PILOT_USERNAME'])
pilot
deliver(
Expand All @@ -51,7 +61,7 @@ platform :ios do

after_all do
# remove credentials from keychain
sh %{ source ~/.circlerc; bundle exec fastlane fastlane-credentials remove --username $PILOT_USERNAME }
xsh %{ source ~/.circlerc; bundle exec fastlane fastlane-credentials remove --username $PILOT_USERNAME }
end

error do |lane, exception|
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "goodcity",
"version": "0.17.7",
"version": "0.17.8",
"description": "Small description for goodcity goes here",
"license": "MIT",
"author": "",
Expand Down
47 changes: 28 additions & 19 deletions tests/acceptance/edit-item-test.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
import Ember from 'ember';
import startApp from '../helpers/start-app';
import Ember from "ember";
import startApp from "../helpers/start-app";
//import syncDataStub from '../helpers/empty-sync-data-stub';
import FactoryGuy from 'ember-data-factory-guy';
import TestHelper from 'ember-data-factory-guy/factory-guy-test-helper';
import FactoryGuy from "ember-data-factory-guy";
import TestHelper from "ember-data-factory-guy/factory-guy-test-helper";

var App, offer, offer1, item, item1;

module('Edit Item', {
module("Edit Item", {
beforeEach: function() {
App = startApp();
TestHelper.setup(App);
//syncDataStub(TestHelper);

offer = FactoryGuy.make("offer", { state: "draft" });
item = FactoryGuy.make("item",{ offer:offer, state: "draft" });
item = FactoryGuy.make("item", { offer: offer, state: "draft" });

offer1 = FactoryGuy.make("offer", { state: "draft" });
item1 = FactoryGuy.make("item",{ offer:offer1, state: "submitted",
donorDescription: "this is a test Item"});
FactoryGuy.makeList("donor_condition", 2);
item1 = FactoryGuy.make("item", {
offer: offer1,
state: "submitted",
donorDescription: "this is a test Item"
});
},

afterEach: function() {
Em.run(function() { TestHelper.teardown(); });
Ember.run(App, 'destroy');
Em.run(function() {
TestHelper.teardown();
});
Ember.run(App, "destroy");
}
});

Expand All @@ -38,10 +42,15 @@ test("Create Item with details", function(assert) {
});

fillIn("textarea[name=donorDescription]", "this is test item");
click(":radio[value=1]");
$(".item-details .radio-buttons li")
.first()
.click();

andThen(function() {
assert.equal(find("textarea[name=donorDescription]").val(), "this is test item");
assert.equal(
find("textarea[name=donorDescription]").val(),
"this is test item"
);
});

// TestHelper.handleUpdate("item", item.id);
Expand All @@ -67,9 +76,9 @@ test("Discard Item with details", function() {
TestHelper.handleDelete("item", item.id);
click(".button:contains('Cancel')");

andThen(function(){
equal(currentURL(), "/offers/"+ offer.id);
equal($('.item-content li').length, 0);
andThen(function() {
equal(currentURL(), "/offers/" + offer.id);
equal($(".item-content li").length, 0);
});
});

Expand All @@ -85,8 +94,8 @@ test("Discard changes for existing Item", function() {

click(".button:contains('Cancel')");

andThen(function(){
equal(currentURL(), "/offers/"+ offer1.id +"/offer_details");
equal($('.item-content li:eq(0) .ellipsis').text(), "this is a test Item");
andThen(function() {
equal(currentURL(), "/offers/" + offer1.id + "/offer_details");
equal($(".item-content li:eq(0) .ellipsis").text(), "this is a test Item");
});
});
7 changes: 4 additions & 3 deletions tests/factories/donor_condition.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import FactoryGuy from 'ember-data-factory-guy';
import FactoryGuy from "ember-data-factory-guy";

var conditions = ["New", "Lightly Used", "Heavily Used", "Broken"];

FactoryGuy.define('donor_condition', {
FactoryGuy.define("donor_condition", {
default: {
name: FactoryGuy.generate(function(num) {
return conditions[num] + num;
})
}),
visibleToDonor: true
}
});

Expand Down
Loading

0 comments on commit 05c5714

Please sign in to comment.