xing-framework 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/bin/xing-rvm-setup-env +8 -0
  3. data/default_configuration/base_app/.bibliotech/config.yaml +12 -0
  4. data/default_configuration/base_app/.codeclimate.yml +36 -0
  5. data/default_configuration/base_app/.csslintrc +2 -0
  6. data/default_configuration/base_app/.eslintignore +1 -0
  7. data/default_configuration/base_app/.eslintrc +213 -0
  8. data/default_configuration/base_app/.git/tags +183 -0
  9. data/default_configuration/base_app/.pivotal-brancher/config.yaml +1 -0
  10. data/default_configuration/base_app/.rubocop.yml +1168 -0
  11. data/default_configuration/base_app/.ruby-version +1 -0
  12. data/default_configuration/base_app/API_DOC/.keep +0 -0
  13. data/default_configuration/base_app/Gemfile.lock +4 -4
  14. data/default_configuration/base_app/Rakefile +3 -1
  15. data/default_configuration/base_app/backend/.pivotal-brancher/config.yaml +2 -0
  16. data/default_configuration/base_app/backend/.ruby-gemset.example +1 -0
  17. data/default_configuration/base_app/backend/.ruby-version +1 -0
  18. data/default_configuration/base_app/backend/.ruby-version.06.05.2015-10:38:25 +1 -0
  19. data/default_configuration/base_app/backend/.ruby-version.example +1 -0
  20. data/default_configuration/base_app/backend/app/mappers/.gitkeep +0 -0
  21. data/default_configuration/base_app/backend/app/serializers/.gitkeep +0 -0
  22. data/default_configuration/base_app/backend/app/workers/.gitkeep +0 -0
  23. data/default_configuration/base_app/backend/db/migrate/.gitkeep +0 -0
  24. data/default_configuration/base_app/backend/lib/tasks/.gitkeep +0 -0
  25. data/default_configuration/base_app/backend/spec/controllers/.gitkeep +0 -0
  26. data/default_configuration/base_app/backend/spec/mappers/.gitkeep +0 -0
  27. data/default_configuration/base_app/backend/spec/routing/.gitkeep +0 -0
  28. data/default_configuration/base_app/backend/spec/serializers/.gitkeep +0 -0
  29. data/default_configuration/base_app/config/deploy.rb +24 -7
  30. data/default_configuration/base_app/frontend/.jshintrc +15 -0
  31. data/default_configuration/base_app/frontend/.pivotal-brancher/config.yaml +1 -0
  32. data/default_configuration/base_app/frontend/.ruby-version +1 -0
  33. data/default_configuration/base_app/frontend/.travis.yml +12 -0
  34. data/default_configuration/base_app/frontend/src/common/resources/.gitkeep +0 -0
  35. data/default_configuration/templates/backend/config/database.yml +22 -0
  36. data/default_configuration/templates/backend/config/database.yml.ci +9 -0
  37. data/default_configuration/templates/backend/config/database.yml.example +22 -0
  38. data/default_configuration/templates/backend/config/secrets.yml +57 -0
  39. data/default_configuration/templates/backend/config/secrets.yml.ci +21 -0
  40. data/default_configuration/templates/backend/config/secrets.yml.example +57 -0
  41. data/default_configuration/templates/backend/gitattributes +1 -0
  42. data/default_configuration/templates/backend/gitignore +46 -0
  43. data/default_configuration/templates/frontend/.gitattributes +1 -0
  44. data/default_configuration/templates/frontend/.gitignore +12 -0
  45. data/default_configuration/templates/frontend/gitattributes +1 -0
  46. data/default_configuration/templates/frontend/gitignore +12 -0
  47. data/default_configuration/templates/gitignore +12 -0
  48. data/lib/xing/cli/generators/new_project.rb +98 -20
  49. data/lib/xing/cli.rb +3 -1
  50. data/spec/cli/generators/new_project_spec.rb +38 -0
  51. data/spec/cli_spec.rb +28 -0
  52. metadata +62 -3
@@ -0,0 +1,38 @@
1
+ require 'xing'
2
+ require 'xing/cli/generators/new_project'
3
+ require 'caliph/testing/mock-command-line'
4
+
5
+ #this is not a great test but we can at least add logic from here.
6
+
7
+ describe Xing::CLI::Generators::NewProject do
8
+ describe "generate" do
9
+ let :arc_mock do
10
+ double("architecture mock")
11
+ end
12
+
13
+ let :mock_result do
14
+ double("caliph result", :succeeded? => true, :must_succeed! => true)
15
+ end
16
+
17
+ let :new_project_generator do
18
+ npg = Xing::CLI::Generators::NewProject.new
19
+ npg.target_name = "awesome"
20
+ npg.ruby_version = "2.2.1"
21
+ npg
22
+ end
23
+
24
+ before do
25
+ allow(File).to receive(:expand_path)
26
+ allow(File).to receive(:open)
27
+ allow(File).to receive(:join)
28
+ allow(File).to receive(:exist?)
29
+ allow(new_project_generator.shell).to receive(:run).and_return(mock_result)
30
+ allow(new_project_generator).to receive(:cmd)
31
+ allow(new_project_generator).to receive(:architecture)
32
+ end
33
+
34
+ it "should succeed" do
35
+ new_project_generator.generate
36
+ end
37
+ end
38
+ end
data/spec/cli_spec.rb ADDED
@@ -0,0 +1,28 @@
1
+ require 'xing/cli'
2
+
3
+ describe Xing::CLI do
4
+ describe "handle_cli" do
5
+ describe "new" do
6
+ let :generator do
7
+ double(Xing::CLI::Generators::NewProject)
8
+ end
9
+
10
+ subject :cli do
11
+ Xing::CLI.new
12
+ end
13
+
14
+ before do
15
+ stub_const("ARGV", ["new", "--with-gemset", "--ruby-version", "2.2.1", "cheese"])
16
+ end
17
+
18
+ it "should pass the right arguments to the generator and generate a project" do
19
+ expect(Xing::CLI::Generators::NewProject).to receive(:new).and_return(generator)
20
+ expect(generator).to receive(:target_name=).with("cheese")
21
+ expect(generator).to receive(:ruby_version=).with("2.2.1")
22
+ expect(generator).to receive(:with_gemset=).with(true)
23
+ expect(generator).to receive(:generate)
24
+ cli.handle_cli
25
+ end
26
+ end
27
+ end
28
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xing-framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Dorn
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-01-15 00:00:00.000000000 Z
12
+ date: 2016-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: trollop
@@ -53,6 +53,20 @@ dependencies:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: '1.10'
56
+ - !ruby/object:Gem::Dependency
57
+ name: architecture
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '6.1'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '6.1'
56
70
  description: |2
57
71
  The Xing Framework is a hypermedia-enabled Rails + AngularJS web and mobile development platform.
58
72
  This gem contains the generator for initializing a new Xing project.
@@ -65,12 +79,28 @@ extensions: []
65
79
  extra_rdoc_files: []
66
80
  files:
67
81
  - bin/xing
82
+ - bin/xing-rvm-setup-env
83
+ - default_configuration/base_app/.bibliotech/config.yaml
84
+ - default_configuration/base_app/.codeclimate.yml
85
+ - default_configuration/base_app/.csslintrc
86
+ - default_configuration/base_app/.eslintignore
87
+ - default_configuration/base_app/.eslintrc
88
+ - default_configuration/base_app/.git/tags
89
+ - default_configuration/base_app/.pivotal-brancher/config.yaml
90
+ - default_configuration/base_app/.rubocop.yml
91
+ - default_configuration/base_app/.ruby-version
92
+ - default_configuration/base_app/API_DOC/.keep
68
93
  - default_configuration/base_app/CHANGELOG.md
69
94
  - default_configuration/base_app/Capfile
70
95
  - default_configuration/base_app/Gemfile
71
96
  - default_configuration/base_app/Gemfile.lock
72
97
  - default_configuration/base_app/README.md
73
98
  - default_configuration/base_app/Rakefile
99
+ - default_configuration/base_app/backend/.pivotal-brancher/config.yaml
100
+ - default_configuration/base_app/backend/.ruby-gemset.example
101
+ - default_configuration/base_app/backend/.ruby-version
102
+ - default_configuration/base_app/backend/.ruby-version.06.05.2015-10:38:25
103
+ - default_configuration/base_app/backend/.ruby-version.example
74
104
  - default_configuration/base_app/backend/Gemfile
75
105
  - default_configuration/base_app/backend/Gemfile.lock
76
106
  - default_configuration/base_app/backend/Rakefile
@@ -78,9 +108,12 @@ files:
78
108
  - default_configuration/base_app/backend/app/controllers/confirmations_controller.rb
79
109
  - default_configuration/base_app/backend/app/controllers/passwords_controller.rb
80
110
  - default_configuration/base_app/backend/app/controllers/registrations_controller.rb
111
+ - default_configuration/base_app/backend/app/mappers/.gitkeep
81
112
  - default_configuration/base_app/backend/app/models/ability.rb
82
113
  - default_configuration/base_app/backend/app/models/role/admin.rb
83
114
  - default_configuration/base_app/backend/app/models/user.rb
115
+ - default_configuration/base_app/backend/app/serializers/.gitkeep
116
+ - default_configuration/base_app/backend/app/workers/.gitkeep
84
117
  - default_configuration/base_app/backend/autotest/discover.rb
85
118
  - default_configuration/base_app/backend/bin/bundle
86
119
  - default_configuration/base_app/backend/bin/rails
@@ -114,23 +147,29 @@ files:
114
147
  - default_configuration/base_app/backend/config/secrets.yml.ci
115
148
  - default_configuration/base_app/backend/config/secrets.yml.example
116
149
  - default_configuration/base_app/backend/config/sidekiq.yml
150
+ - default_configuration/base_app/backend/db/migrate/.gitkeep
117
151
  - default_configuration/base_app/backend/db/sample_data/users.rake
118
152
  - default_configuration/base_app/backend/db/seeds.rb
119
153
  - default_configuration/base_app/backend/lib/static-app.rb
154
+ - default_configuration/base_app/backend/lib/tasks/.gitkeep
120
155
  - default_configuration/base_app/backend/public/404.html
121
156
  - default_configuration/base_app/backend/public/422.html
122
157
  - default_configuration/base_app/backend/public/500.html
123
158
  - default_configuration/base_app/backend/public/favicon.ico
124
159
  - default_configuration/base_app/backend/public/robots.txt
125
160
  - default_configuration/base_app/backend/script/rails
161
+ - default_configuration/base_app/backend/spec/controllers/.gitkeep
126
162
  - default_configuration/base_app/backend/spec/factories/user_sessions_factory.rb
127
163
  - default_configuration/base_app/backend/spec/factories/users_factory.rb
128
164
  - default_configuration/base_app/backend/spec/features/user_sends_reset_password_email_spec.rb
129
165
  - default_configuration/base_app/backend/spec/features/user_signs_up_spec.rb
166
+ - default_configuration/base_app/backend/spec/mappers/.gitkeep
130
167
  - default_configuration/base_app/backend/spec/models/role/admin_spec.rb
131
168
  - default_configuration/base_app/backend/spec/models/role_spec.rb
132
169
  - default_configuration/base_app/backend/spec/models/user_spec.rb
133
170
  - default_configuration/base_app/backend/spec/requests/resources_index_spec.rb
171
+ - default_configuration/base_app/backend/spec/routing/.gitkeep
172
+ - default_configuration/base_app/backend/spec/serializers/.gitkeep
134
173
  - default_configuration/base_app/backend/spec/spec_helper.rb
135
174
  - default_configuration/base_app/backend/spec/support/devise_helper.rb
136
175
  - default_configuration/base_app/backend/spec/support/session_helpers.rb
@@ -147,6 +186,10 @@ files:
147
186
  - default_configuration/base_app/doc/03_fail_menus.txt
148
187
  - default_configuration/base_app/dump.rdb
149
188
  - default_configuration/base_app/example-lrd-dev-tmux.conf
189
+ - default_configuration/base_app/frontend/.jshintrc
190
+ - default_configuration/base_app/frontend/.pivotal-brancher/config.yaml
191
+ - default_configuration/base_app/frontend/.ruby-version
192
+ - default_configuration/base_app/frontend/.travis.yml
150
193
  - default_configuration/base_app/frontend/Gemfile
151
194
  - default_configuration/base_app/frontend/Gemfile.lock
152
195
  - default_configuration/base_app/frontend/Gruntfile.js
@@ -205,6 +248,7 @@ files:
205
248
  - default_configuration/base_app/frontend/src/common/components/signOut/signOut.js
206
249
  - default_configuration/base_app/frontend/src/common/config.js
207
250
  - default_configuration/base_app/frontend/src/common/resources.js
251
+ - default_configuration/base_app/frontend/src/common/resources/.gitkeep
208
252
  - default_configuration/base_app/frontend/src/index.html
209
253
  - default_configuration/base_app/frontend/src/styles/_constants.sass
210
254
  - default_configuration/base_app/frontend/src/styles/main.sass
@@ -232,10 +276,25 @@ files:
232
276
  - default_configuration/base_app/static-app.ru
233
277
  - default_configuration/base_app/tmux-windows
234
278
  - default_configuration/base_app/tmux-windows.txt
279
+ - default_configuration/templates/backend/config/database.yml
280
+ - default_configuration/templates/backend/config/database.yml.ci
281
+ - default_configuration/templates/backend/config/database.yml.example
282
+ - default_configuration/templates/backend/config/secrets.yml
283
+ - default_configuration/templates/backend/config/secrets.yml.ci
284
+ - default_configuration/templates/backend/config/secrets.yml.example
285
+ - default_configuration/templates/backend/gitattributes
286
+ - default_configuration/templates/backend/gitignore
287
+ - default_configuration/templates/frontend/.gitattributes
288
+ - default_configuration/templates/frontend/.gitignore
289
+ - default_configuration/templates/frontend/gitattributes
290
+ - default_configuration/templates/frontend/gitignore
291
+ - default_configuration/templates/gitignore
235
292
  - lib/xing.rb
236
293
  - lib/xing/cli.rb
237
294
  - lib/xing/cli/generators.rb
238
295
  - lib/xing/cli/generators/new_project.rb
296
+ - spec/cli/generators/new_project_spec.rb
297
+ - spec/cli_spec.rb
239
298
  - spec/null_spec.rb
240
299
  - spec_help/gem_test_suite.rb
241
300
  - spec_help/spec_helper.rb
@@ -249,7 +308,7 @@ rdoc_options:
249
308
  - "--main"
250
309
  - doc/README
251
310
  - "--title"
252
- - xing-framework-0.2.3 Documentation
311
+ - xing-framework-0.2.4 Documentation
253
312
  require_paths:
254
313
  - lib/
255
314
  required_ruby_version: !ruby/object:Gem::Requirement