locomotivecms_wagon 2.0.1 → 2.1.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -3
  3. data/generators/blank/config/metafields_schema.yml +56 -0
  4. data/generators/blank/config/site.yml.tt +14 -0
  5. data/generators/bootstrap/config/metafields_schema.yml +56 -0
  6. data/generators/bootstrap/config/site.yml.tt +14 -0
  7. data/generators/foundation5/config/metafields_schema.yml +56 -0
  8. data/generators/foundation5/config/site.yml.tt +14 -0
  9. data/generators/site_metafields/schema.yml.tt +56 -0
  10. data/lib/locomotive/wagon/cli.rb +11 -1
  11. data/lib/locomotive/wagon/commands/concerns/steam_concern.rb +4 -3
  12. data/lib/locomotive/wagon/commands/pull_command.rb +1 -1
  13. data/lib/locomotive/wagon/commands/pull_sub_commands/concerns/assets_concern.rb +8 -0
  14. data/lib/locomotive/wagon/commands/pull_sub_commands/pull_site_command.rb +24 -1
  15. data/lib/locomotive/wagon/commands/push_sub_commands/push_site_command.rb +3 -1
  16. data/lib/locomotive/wagon/commands/serve_command.rb +15 -0
  17. data/lib/locomotive/wagon/commands/sync_command.rb +1 -1
  18. data/lib/locomotive/wagon/commands/sync_sub_commands/sync_site_command.rb +31 -0
  19. data/lib/locomotive/wagon/decorators/concerns/persist_assets_concern.rb +8 -0
  20. data/lib/locomotive/wagon/decorators/content_entry_decorator.rb +1 -0
  21. data/lib/locomotive/wagon/decorators/site_decorator.rb +13 -1
  22. data/lib/locomotive/wagon/generators/site_metafields.rb +54 -0
  23. data/lib/locomotive/wagon/tools/yaml_ext.rb +21 -0
  24. data/lib/locomotive/wagon/version.rb +1 -1
  25. data/locomotivecms_wagon.gemspec +4 -4
  26. data/spec/fixtures/cassettes/authenticate.yml +41 -82
  27. data/spec/fixtures/cassettes/delete.yml +159 -159
  28. data/spec/fixtures/cassettes/push.yml +1015 -1015
  29. data/spec/integration/cli_spec.rb +1 -1
  30. data/spec/unit/decorators/content_entry_decorator_spec.rb +10 -0
  31. data/spec/unit/tools/yaml_ext_spec.rb +46 -0
  32. metadata +21 -12
@@ -26,13 +26,13 @@ Gem::Specification.new do |gem|
26
26
  gem.add_dependency 'rubyzip', '~> 1.1.7'
27
27
  gem.add_dependency 'netrc', '~> 0.10.3'
28
28
 
29
- gem.add_dependency 'locomotivecms_common', '~> 0.0.5'
30
- gem.add_dependency 'locomotivecms_coal', '~> 1.0.0'
31
- gem.add_dependency 'locomotivecms_steam', '~> 1.0.1'
29
+ gem.add_dependency 'locomotivecms_common', '~> 0.1.0'
30
+ gem.add_dependency 'locomotivecms_coal', '~> 1.1.0'
31
+ gem.add_dependency 'locomotivecms_steam', '~> 1.1.0.rc1'
32
32
 
33
33
  gem.add_dependency 'listen', '~> 3.0.4'
34
34
  gem.add_dependency 'rack-livereload', '~> 0.3.16'
35
35
  gem.add_dependency 'yui-compressor', '~> 0.12.0'
36
36
 
37
- gem.add_dependency 'faker', '~> 1.4.3'
37
+ gem.add_dependency 'faker', '~> 1.6'
38
38
  end
@@ -17,104 +17,63 @@ http_interactions:
17
17
  - Ruby
18
18
  response:
19
19
  status:
20
- code: 201
21
- message: Created
20
+ code: 401
21
+ message: Unauthorized
22
22
  headers:
23
23
  Content-Type:
24
24
  - application/json
25
- Etag:
26
- - W/"bc2668dfce49ce8b86c24c5238a6ad8a"
25
+ X-Error-Detail:
26
+ - Invalid email or password.
27
27
  Cache-Control:
28
- - max-age=0, private, must-revalidate
28
+ - no-cache
29
29
  X-Request-Id:
30
- - ac82d4d7-0fab-42e5-b204-e7b3aeb1dc0c
30
+ - 4c1dde74-5ab5-47e1-878b-6bafaa3ae31d
31
31
  X-Runtime:
32
- - '0.538828'
32
+ - '0.491453'
33
33
  Content-Length:
34
- - '32'
34
+ - '40'
35
35
  body:
36
36
  encoding: UTF-8
37
- string: '{"token":"4UbNL-FP8WQsnonBusPw"}'
37
+ string: '{"message":"Invalid email or password."}'
38
38
  http_version:
39
- recorded_at: Tue, 16 Feb 2016 00:46:20 GMT
39
+ recorded_at: Wed, 17 Feb 2016 20:59:45 GMT
40
40
  - request:
41
- method: get
42
- uri: http://localhost:3000/locomotive/api/v3/my_account.json?auth_token=4UbNL-FP8WQsnonBusPw
43
- body:
44
- encoding: US-ASCII
45
- string: ''
46
- headers:
47
- Accept:
48
- - application/json
49
- X-Locomotive-Account-Email:
50
- - john@doe.net
51
- X-Locomotive-Account-Token:
52
- - 4UbNL-FP8WQsnonBusPw
53
- Accept-Encoding:
54
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
55
- User-Agent:
56
- - Ruby
57
- response:
58
- status:
59
- code: 200
60
- message: OK
61
- headers:
62
- Content-Type:
63
- - application/json
64
- Etag:
65
- - W/"1fede7cbfdb8717942bf763b9ce2c37d"
66
- Cache-Control:
67
- - max-age=0, private, must-revalidate
68
- X-Request-Id:
69
- - 89d151cf-949c-43e4-857e-e35e27388fda
70
- X-Runtime:
71
- - '0.063627'
72
- Content-Length:
73
- - '250'
41
+ method: post
42
+ uri: http://localhost:3000/locomotive/api/v3/my_account.json
74
43
  body:
75
44
  encoding: UTF-8
76
- string: '{"_id":"56c265bdc365114365000000","created_at":"2016-02-15T23:56:45Z","updated_at":"2016-02-15T23:56:45Z","name":"John","email":"john@doe.net","locale":"en","api_key":"69f81710e41bd4fe8693d0447a31e7bfcf07d8d7","super_admin":false,"local_admin":false}'
77
- http_version:
78
- recorded_at: Tue, 16 Feb 2016 00:46:20 GMT
79
- - request:
80
- method: get
81
- uri: http://localhost:3000/locomotive/api/v3/my_account.json?auth_token=4UbNL-FP8WQsnonBusPw
82
- body:
83
- encoding: US-ASCII
84
- string: ''
45
+ string: account%5Bemail%5D=john%40doe.net&account%5Bname%5D=John&account%5Bpassword%5D=asimplepassword
85
46
  headers:
86
47
  Accept:
87
48
  - application/json
88
- X-Locomotive-Account-Email:
89
- - john@doe.net
90
- X-Locomotive-Account-Token:
91
- - 4UbNL-FP8WQsnonBusPw
49
+ Content-Type:
50
+ - application/x-www-form-urlencoded
92
51
  Accept-Encoding:
93
52
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
94
53
  User-Agent:
95
54
  - Ruby
96
55
  response:
97
56
  status:
98
- code: 200
99
- message: OK
57
+ code: 201
58
+ message: Created
100
59
  headers:
101
60
  Content-Type:
102
61
  - application/json
103
62
  Etag:
104
- - W/"1fede7cbfdb8717942bf763b9ce2c37d"
63
+ - W/"ecd8bcbc56ad219c12f928c0c7642228"
105
64
  Cache-Control:
106
65
  - max-age=0, private, must-revalidate
107
66
  X-Request-Id:
108
- - 4b88417d-24af-40e4-a6b3-3211ce98e6cf
67
+ - 163cedb0-c315-4318-905a-2ca2184c2865
109
68
  X-Runtime:
110
- - '0.020165'
69
+ - '0.086436'
111
70
  Content-Length:
112
71
  - '250'
113
72
  body:
114
73
  encoding: UTF-8
115
- string: '{"_id":"56c265bdc365114365000000","created_at":"2016-02-15T23:56:45Z","updated_at":"2016-02-15T23:56:45Z","name":"John","email":"john@doe.net","locale":"en","api_key":"69f81710e41bd4fe8693d0447a31e7bfcf07d8d7","super_admin":false,"local_admin":false}'
74
+ string: '{"_id":"56c4df41c3651180309c60d3","created_at":"2016-02-17T20:59:45Z","updated_at":"2016-02-17T20:59:45Z","name":"John","email":"john@doe.net","locale":"en","api_key":"3f7bb7a02a1ad6c3e285beda89e6e8a3f75d9154","super_admin":false,"local_admin":false}'
116
75
  http_version:
117
- recorded_at: Tue, 16 Feb 2016 00:46:21 GMT
76
+ recorded_at: Wed, 17 Feb 2016 20:59:45 GMT
118
77
  - request:
119
78
  method: post
120
79
  uri: http://localhost:3000/locomotive/api/v3/tokens.json
@@ -138,23 +97,23 @@ http_interactions:
138
97
  Content-Type:
139
98
  - application/json
140
99
  Etag:
141
- - W/"3cc699723ac44b6b16405f0c666c9bc3"
100
+ - W/"9f0203483ba848323bbda0b85ed7725e"
142
101
  Cache-Control:
143
102
  - max-age=0, private, must-revalidate
144
103
  X-Request-Id:
145
- - e347d042-8a3a-4ee0-9126-4973edd50f4d
104
+ - 4aed7a00-f72d-4367-890b-d827b3cff156
146
105
  X-Runtime:
147
- - '0.021840'
106
+ - '0.015710'
148
107
  Content-Length:
149
108
  - '32'
150
109
  body:
151
110
  encoding: UTF-8
152
- string: '{"token":"C2t1wxAuKy7YPAHVva29"}'
111
+ string: '{"token":"e1QSfNaw8zQM7rWX5CPf"}'
153
112
  http_version:
154
- recorded_at: Tue, 16 Feb 2016 00:46:21 GMT
113
+ recorded_at: Wed, 17 Feb 2016 20:59:45 GMT
155
114
  - request:
156
115
  method: get
157
- uri: http://localhost:3000/locomotive/api/v3/my_account.json?auth_token=C2t1wxAuKy7YPAHVva29
116
+ uri: http://localhost:3000/locomotive/api/v3/my_account.json?auth_token=e1QSfNaw8zQM7rWX5CPf
158
117
  body:
159
118
  encoding: US-ASCII
160
119
  string: ''
@@ -164,7 +123,7 @@ http_interactions:
164
123
  X-Locomotive-Account-Email:
165
124
  - admin@locomotivecms.com
166
125
  X-Locomotive-Account-Token:
167
- - C2t1wxAuKy7YPAHVva29
126
+ - e1QSfNaw8zQM7rWX5CPf
168
127
  Accept-Encoding:
169
128
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
170
129
  User-Agent:
@@ -177,23 +136,23 @@ http_interactions:
177
136
  Content-Type:
178
137
  - application/json
179
138
  Etag:
180
- - W/"6dc03a13985e38bbf77d96a5b9803c04"
139
+ - W/"7d8f03d047be776ab17daf20e33dc4ad"
181
140
  Cache-Control:
182
141
  - max-age=0, private, must-revalidate
183
142
  X-Request-Id:
184
- - 1217e1b0-1f5d-4ef1-b22b-af9a2cced709
143
+ - 18bee298-4a65-4938-9e2f-f80f0c82f53e
185
144
  X-Runtime:
186
- - '0.019349'
145
+ - '0.027460'
187
146
  Content-Length:
188
147
  - '261'
189
148
  body:
190
149
  encoding: UTF-8
191
- string: '{"_id":"56c25ac5c36511433f000000","created_at":"2016-02-15T23:09:57Z","updated_at":"2016-02-15T23:09:57Z","name":"Admin","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":false,"local_admin":true}'
150
+ string: '{"_id":"56c4df17c36511800c8b9037","created_at":"2016-02-17T20:59:03Z","updated_at":"2016-02-17T20:59:03Z","name":"Admin","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":false,"local_admin":true}'
192
151
  http_version:
193
- recorded_at: Tue, 16 Feb 2016 00:46:21 GMT
152
+ recorded_at: Wed, 17 Feb 2016 20:59:45 GMT
194
153
  - request:
195
154
  method: get
196
- uri: http://localhost:3000/locomotive/api/v3/my_account.json?auth_token=C2t1wxAuKy7YPAHVva29
155
+ uri: http://localhost:3000/locomotive/api/v3/my_account.json?auth_token=e1QSfNaw8zQM7rWX5CPf
197
156
  body:
198
157
  encoding: US-ASCII
199
158
  string: ''
@@ -203,7 +162,7 @@ http_interactions:
203
162
  X-Locomotive-Account-Email:
204
163
  - admin@locomotivecms.com
205
164
  X-Locomotive-Account-Token:
206
- - C2t1wxAuKy7YPAHVva29
165
+ - e1QSfNaw8zQM7rWX5CPf
207
166
  Accept-Encoding:
208
167
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
209
168
  User-Agent:
@@ -216,18 +175,18 @@ http_interactions:
216
175
  Content-Type:
217
176
  - application/json
218
177
  Etag:
219
- - W/"6dc03a13985e38bbf77d96a5b9803c04"
178
+ - W/"7d8f03d047be776ab17daf20e33dc4ad"
220
179
  Cache-Control:
221
180
  - max-age=0, private, must-revalidate
222
181
  X-Request-Id:
223
- - 92680a0a-6313-4a81-990c-f2d0d158fee5
182
+ - 58ee0cc3-0a25-43f6-ab83-ec81d9ed63ff
224
183
  X-Runtime:
225
- - '0.019043'
184
+ - '0.015876'
226
185
  Content-Length:
227
186
  - '261'
228
187
  body:
229
188
  encoding: UTF-8
230
- string: '{"_id":"56c25ac5c36511433f000000","created_at":"2016-02-15T23:09:57Z","updated_at":"2016-02-15T23:09:57Z","name":"Admin","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":false,"local_admin":true}'
189
+ string: '{"_id":"56c4df17c36511800c8b9037","created_at":"2016-02-17T20:59:03Z","updated_at":"2016-02-17T20:59:03Z","name":"Admin","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":false,"local_admin":true}'
231
190
  http_version:
232
- recorded_at: Tue, 16 Feb 2016 00:46:21 GMT
191
+ recorded_at: Wed, 17 Feb 2016 20:59:45 GMT
233
192
  recorded_with: VCR 3.0.0