xing-framework 0.2.6 → 0.2.7.pre.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/default_configuration/base_app/CONTRIBUTING.md +1 -0
- data/default_configuration/base_app/Gemfile +0 -1
- data/default_configuration/base_app/Gemfile.lock +3 -92
- data/default_configuration/base_app/README.md +5 -4
- data/default_configuration/base_app/backend/Gemfile.lock +44 -40
- data/default_configuration/base_app/backend/config/application.rb +2 -1
- data/default_configuration/base_app/backend/config/secrets.yml.ci +1 -0
- data/default_configuration/base_app/backend/config/secrets.yml.example +6 -4
- data/default_configuration/base_app/frontend/npm-shrinkwrap.json +1760 -1600
- data/default_configuration/base_app/frontend/package.json +24 -21
- data/default_configuration/templates/CHANGELOG.md +1 -0
- data/default_configuration/templates/CODE_OF_CONDUCT.md +50 -0
- data/default_configuration/templates/CONTRIBUTING.md +1 -0
- data/default_configuration/templates/README.md +22 -0
- data/default_configuration/templates/backend/config/secrets.yml +3 -0
- data/default_configuration/templates/backend/config/secrets.yml.ci +2 -0
- data/default_configuration/templates/backend/config/secrets.yml.example +4 -0
- data/lib/xing/cli/generators/new_project/user_input.rb +33 -0
- data/lib/xing/cli/generators/new_project.rb +53 -40
- data/lib/xing/cli/templaters/code_of_conduct_templater.rb +7 -0
- data/lib/xing/cli/templaters/control_files_templater.rb +12 -0
- data/lib/xing/cli/templaters/database_yml_templater.rb +9 -0
- data/lib/xing/cli/templaters/doc_files_templater.rb +9 -0
- data/lib/xing/cli/templaters/secrets_yml_templater.rb +9 -0
- data/lib/xing/cli/templaters.rb +28 -0
- data/spec/cli/generators/new_project/user_input_spec.rb +41 -0
- data/spec/cli/generators/new_project_spec.rb +46 -3
- data/spec/cli/templaters_spec.rb +125 -0
- metadata +31 -6
- data/default_configuration/templates/dot.gitignore +0 -50
@@ -0,0 +1,125 @@
|
|
1
|
+
require 'xing'
|
2
|
+
require 'xing/cli/templaters'
|
3
|
+
|
4
|
+
describe "xing templaters" do
|
5
|
+
let :mock_arc do
|
6
|
+
double("mock_arc")
|
7
|
+
end
|
8
|
+
|
9
|
+
let :context do
|
10
|
+
{ app_name: "cheese"}
|
11
|
+
end
|
12
|
+
|
13
|
+
describe Xing::CLI::Templaters::Templater
|
14
|
+
describe "guard is off" do
|
15
|
+
let :templater do
|
16
|
+
Xing::CLI::Templaters::Templater.new("cheese", context, false)
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should do templating" do
|
20
|
+
expect(templater).to receive(:architecture).with(source: File.expand_path("../../../default_configuration/templates/", __FILE__), destination: "cheese")
|
21
|
+
templater.template
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe "guard is on" do
|
26
|
+
let :templater do
|
27
|
+
Xing::CLI::Templaters::Templater.new("cheese", context, true)
|
28
|
+
end
|
29
|
+
|
30
|
+
it "should not do templating" do
|
31
|
+
expect(templater).to_not receive(:architecture)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe Xing::CLI::Templaters::SecretsYmlTemplater do
|
36
|
+
|
37
|
+
let :secrets_yml_templater do
|
38
|
+
Xing::CLI::Templaters::SecretsYmlTemplater.new("cheese", context, false)
|
39
|
+
end
|
40
|
+
|
41
|
+
before do
|
42
|
+
allow(secrets_yml_templater).to receive(:architecture).and_yield(mock_arc)
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should copy all secrets yml templates" do
|
46
|
+
expect(mock_arc).to receive(:copy).with(file: "backend/config/secrets.yml", context: context)
|
47
|
+
expect(mock_arc).to receive(:copy).with(file: "backend/config/secrets.yml.ci", context: context)
|
48
|
+
expect(mock_arc).to receive(:copy).with(file: "backend/config/secrets.yml.example", context: context)
|
49
|
+
secrets_yml_templater.template
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe Xing::CLI::Templaters::DatabaseYmlTemplater do
|
54
|
+
|
55
|
+
let :database_yml_templater do
|
56
|
+
Xing::CLI::Templaters::DatabaseYmlTemplater.new("cheese", context, false)
|
57
|
+
end
|
58
|
+
|
59
|
+
before do
|
60
|
+
allow(database_yml_templater).to receive(:architecture).and_yield(mock_arc)
|
61
|
+
end
|
62
|
+
|
63
|
+
it "should copy all database yml templates" do
|
64
|
+
expect(mock_arc).to receive(:copy).with(file: "backend/config/database.yml", context: context)
|
65
|
+
expect(mock_arc).to receive(:copy).with(file: "backend/config/database.yml.ci", context: context)
|
66
|
+
expect(mock_arc).to receive(:copy).with(file: "backend/config/database.yml.example", context: context)
|
67
|
+
database_yml_templater.template
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe Xing::CLI::Templaters::DocFilesTemplater do
|
72
|
+
|
73
|
+
let :doc_files_templater do
|
74
|
+
Xing::CLI::Templaters::DocFilesTemplater.new("cheese", context, false)
|
75
|
+
end
|
76
|
+
|
77
|
+
before do
|
78
|
+
allow(doc_files_templater).to receive(:architecture).and_yield(mock_arc)
|
79
|
+
end
|
80
|
+
|
81
|
+
it "should copy all doc files templates" do
|
82
|
+
expect(mock_arc).to receive(:copy).with(file: "README.md", context: context)
|
83
|
+
expect(mock_arc).to receive(:copy).with(file: "CONTRIBUTING.md")
|
84
|
+
expect(mock_arc).to receive(:copy).with(file: "CHANGELOG.md")
|
85
|
+
doc_files_templater.template
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
describe Xing::CLI::Templaters::CodeOfConductTemplater do
|
90
|
+
|
91
|
+
let :code_of_conduct_templater do
|
92
|
+
Xing::CLI::Templaters::CodeOfConductTemplater.new("cheese", context, false)
|
93
|
+
end
|
94
|
+
|
95
|
+
before do
|
96
|
+
allow(code_of_conduct_templater).to receive(:architecture).and_yield(mock_arc)
|
97
|
+
end
|
98
|
+
|
99
|
+
it "should copy all doc files templates" do
|
100
|
+
expect(mock_arc).to receive(:copy).with(file: "CODE_OF_CONDUCT.md", context: context)
|
101
|
+
code_of_conduct_templater.template
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
describe Xing::CLI::Templaters::ControlFilesTemplater do
|
106
|
+
|
107
|
+
let :control_files_templater do
|
108
|
+
Xing::CLI::Templaters::ControlFilesTemplater.new("cheese", context, false)
|
109
|
+
end
|
110
|
+
|
111
|
+
before do
|
112
|
+
allow(control_files_templater).to receive(:architecture).and_yield(mock_arc)
|
113
|
+
end
|
114
|
+
|
115
|
+
it "should copy all git control files templates" do
|
116
|
+
expect(mock_arc).to receive(:copy).with(file: "gitignore", as: ".gitignore")
|
117
|
+
expect(mock_arc).to receive(:copy).with(file: "backend/gitignore", as: "backend/.gitignore")
|
118
|
+
expect(mock_arc).to receive(:copy).with(file: "frontend/gitignore", as: "frontend/.gitignore")
|
119
|
+
expect(mock_arc).to receive(:copy).with(file: "gitattributes", as: ".gitattributes")
|
120
|
+
expect(mock_arc).to receive(:copy).with(file: "backend/gitattributes", as: "backend/.gitattributes")
|
121
|
+
expect(mock_arc).to receive(:copy).with(file: "frontend/gitattributes", as: "frontend/.gitattributes")
|
122
|
+
control_files_templater.template
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
metadata
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xing-framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7.pre.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Dorn
|
8
8
|
- Judson Lester
|
9
|
-
- Hannah Howard
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2016-01-
|
12
|
+
date: 2016-01-26 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: trollop
|
@@ -68,13 +67,26 @@ dependencies:
|
|
68
67
|
- - "~>"
|
69
68
|
- !ruby/object:Gem::Version
|
70
69
|
version: '6.1'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: highline
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '1.7'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '1.7'
|
71
84
|
description: |2
|
72
85
|
The Xing Framework is a hypermedia-enabled Rails + AngularJS web and mobile development platform.
|
73
86
|
This gem contains the generator for initializing a new Xing project.
|
74
87
|
email:
|
75
88
|
- evan@lrdesign.com
|
76
89
|
- judson@lrdesign.com
|
77
|
-
- hannah@lrdesign.com
|
78
90
|
executables:
|
79
91
|
- xing
|
80
92
|
extensions: []
|
@@ -92,6 +104,7 @@ files:
|
|
92
104
|
- default_configuration/base_app/.ruby-version
|
93
105
|
- default_configuration/base_app/API_DOC/.keep
|
94
106
|
- default_configuration/base_app/CHANGELOG.md
|
107
|
+
- default_configuration/base_app/CONTRIBUTING.md
|
95
108
|
- default_configuration/base_app/Capfile
|
96
109
|
- default_configuration/base_app/Gemfile
|
97
110
|
- default_configuration/base_app/Gemfile.lock
|
@@ -277,6 +290,10 @@ files:
|
|
277
290
|
- default_configuration/base_app/static-app.ru
|
278
291
|
- default_configuration/base_app/tmux-windows
|
279
292
|
- default_configuration/base_app/tmux-windows.txt
|
293
|
+
- default_configuration/templates/CHANGELOG.md
|
294
|
+
- default_configuration/templates/CODE_OF_CONDUCT.md
|
295
|
+
- default_configuration/templates/CONTRIBUTING.md
|
296
|
+
- default_configuration/templates/README.md
|
280
297
|
- default_configuration/templates/backend/config/database.yml
|
281
298
|
- default_configuration/templates/backend/config/database.yml.ci
|
282
299
|
- default_configuration/templates/backend/config/database.yml.example
|
@@ -285,7 +302,6 @@ files:
|
|
285
302
|
- default_configuration/templates/backend/config/secrets.yml.example
|
286
303
|
- default_configuration/templates/backend/gitattributes
|
287
304
|
- default_configuration/templates/backend/gitignore
|
288
|
-
- default_configuration/templates/dot.gitignore
|
289
305
|
- default_configuration/templates/frontend/.gitattributes
|
290
306
|
- default_configuration/templates/frontend/.gitignore
|
291
307
|
- default_configuration/templates/frontend/gitattributes
|
@@ -296,7 +312,16 @@ files:
|
|
296
312
|
- lib/xing/cli.rb
|
297
313
|
- lib/xing/cli/generators.rb
|
298
314
|
- lib/xing/cli/generators/new_project.rb
|
315
|
+
- lib/xing/cli/generators/new_project/user_input.rb
|
316
|
+
- lib/xing/cli/templaters.rb
|
317
|
+
- lib/xing/cli/templaters/code_of_conduct_templater.rb
|
318
|
+
- lib/xing/cli/templaters/control_files_templater.rb
|
319
|
+
- lib/xing/cli/templaters/database_yml_templater.rb
|
320
|
+
- lib/xing/cli/templaters/doc_files_templater.rb
|
321
|
+
- lib/xing/cli/templaters/secrets_yml_templater.rb
|
322
|
+
- spec/cli/generators/new_project/user_input_spec.rb
|
299
323
|
- spec/cli/generators/new_project_spec.rb
|
324
|
+
- spec/cli/templaters_spec.rb
|
300
325
|
- spec/cli_spec.rb
|
301
326
|
- spec/null_spec.rb
|
302
327
|
- spec_help/gem_test_suite.rb
|
@@ -311,7 +336,7 @@ rdoc_options:
|
|
311
336
|
- "--main"
|
312
337
|
- doc/README
|
313
338
|
- "--title"
|
314
|
-
- xing-framework-0.2.
|
339
|
+
- xing-framework-0.2.7.pre.beta1 Documentation
|
315
340
|
require_paths:
|
316
341
|
- lib/
|
317
342
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -1,50 +0,0 @@
|
|
1
|
-
# Xing build products
|
2
|
-
server/public/assets
|
3
|
-
server/public/fonts
|
4
|
-
server/public/index.html
|
5
|
-
server/vendor
|
6
|
-
frontend/tmp/
|
7
|
-
tmp/
|
8
|
-
.sass-cache/
|
9
|
-
dump.rdb
|
10
|
-
|
11
|
-
# Sourcemaps
|
12
|
-
**/*.map
|
13
|
-
|
14
|
-
# Frontend
|
15
|
-
frontend/src/common/environment.js
|
16
|
-
frontend/vendor/
|
17
|
-
frontend/bin/
|
18
|
-
frontend/build/
|
19
|
-
|
20
|
-
# Security: Ignore database and secrets config
|
21
|
-
backend/config/database.yml
|
22
|
-
backend/config/secrets.yml
|
23
|
-
|
24
|
-
# Ruby: Bundler artifacts
|
25
|
-
.bundle/
|
26
|
-
|
27
|
-
# Ruby: artifacts produced by gems
|
28
|
-
.cadre/
|
29
|
-
spec/support/c
|
30
|
-
|
31
|
-
# Rails: Ignore bundler config.
|
32
|
-
backend/.bundle
|
33
|
-
|
34
|
-
# Rails: Ignore all logfiles and tempfiles.
|
35
|
-
backend/log/*
|
36
|
-
backend/log/.keep
|
37
|
-
backend/tmp
|
38
|
-
|
39
|
-
# RCS Artifacts
|
40
|
-
*.orig
|
41
|
-
|
42
|
-
# Operating system and editor artifacts
|
43
|
-
.DS_Store
|
44
|
-
*.sw?
|
45
|
-
*~
|
46
|
-
.idea/
|
47
|
-
.vim-role
|
48
|
-
.vimrc
|
49
|
-
.conductor/*
|
50
|
-
.conductor/**/*
|