locomotivecms_wagon 2.0.0.pre.alpha.3 → 2.0.0.pre.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -6
  3. data/bin/wagon +1 -1
  4. data/generators/cloned/config/deploy.yml.tt +3 -2
  5. data/generators/content_type/app/content_types/%slug%.yml.tt +7 -0
  6. data/lib/locomotive/wagon/cli.rb +66 -73
  7. data/lib/locomotive/wagon/commands/clone_command.rb +35 -0
  8. data/lib/locomotive/wagon/commands/destroy_command.rb +29 -0
  9. data/lib/locomotive/wagon/commands/loggers/base_logger.rb +31 -0
  10. data/lib/locomotive/wagon/commands/loggers/pull_logger.rb +23 -0
  11. data/lib/locomotive/wagon/commands/loggers/push_logger.rb +23 -17
  12. data/lib/locomotive/wagon/commands/loggers/sync_logger.rb +23 -0
  13. data/lib/locomotive/wagon/commands/pull_command.rb +55 -0
  14. data/lib/locomotive/wagon/commands/pull_sub_commands/concerns/assets_concern.rb +75 -0
  15. data/lib/locomotive/wagon/commands/pull_sub_commands/pull_base_command.rb +83 -0
  16. data/lib/locomotive/wagon/commands/pull_sub_commands/pull_content_assets_command.rb +24 -0
  17. data/lib/locomotive/wagon/commands/pull_sub_commands/pull_content_entries_command.rb +94 -0
  18. data/lib/locomotive/wagon/commands/pull_sub_commands/pull_content_types_command.rb +42 -0
  19. data/lib/locomotive/wagon/commands/pull_sub_commands/pull_pages_command.rb +54 -0
  20. data/lib/locomotive/wagon/commands/pull_sub_commands/pull_site_command.rb +55 -0
  21. data/lib/locomotive/wagon/commands/pull_sub_commands/pull_snippets_command.rb +29 -0
  22. data/lib/locomotive/wagon/commands/pull_sub_commands/pull_theme_assets_command.rb +29 -0
  23. data/lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb +24 -0
  24. data/lib/locomotive/wagon/commands/push_command.rb +1 -1
  25. data/lib/locomotive/wagon/commands/push_sub_commands/push_site_command.rb +28 -0
  26. data/lib/locomotive/wagon/commands/serve_command.rb +1 -1
  27. data/lib/locomotive/wagon/commands/sync_command.rb +57 -0
  28. data/lib/locomotive/wagon/commands/sync_sub_commands/concerns/base_concern.rb +41 -0
  29. data/lib/locomotive/wagon/commands/sync_sub_commands/sync_content_entries_command.rb +9 -0
  30. data/lib/locomotive/wagon/commands/sync_sub_commands/sync_pages_command.rb +41 -0
  31. data/lib/locomotive/wagon/commands/sync_sub_commands/sync_translations_command.rb +9 -0
  32. data/lib/locomotive/wagon/decorators/concerns/to_hash_concern.rb +1 -1
  33. data/lib/locomotive/wagon/decorators/content_type_decorator.rb +7 -3
  34. data/lib/locomotive/wagon/decorators/content_type_field_decorator.rb +6 -1
  35. data/lib/locomotive/wagon/decorators/site_decorator.rb +8 -0
  36. data/lib/locomotive/wagon/generators/site/base.rb +1 -1
  37. data/lib/locomotive/wagon/generators/site/cloned.rb +1 -1
  38. data/lib/locomotive/wagon/generators/site.rb +0 -2
  39. data/lib/locomotive/wagon/tools/styled_yaml.rb +122 -0
  40. data/lib/locomotive/wagon/version.rb +1 -1
  41. data/lib/locomotive/wagon.rb +22 -57
  42. data/locomotivecms_wagon.gemspec +2 -2
  43. data/spec/fixtures/cassettes/authenticate.yml +49 -122
  44. data/spec/fixtures/cassettes/push.yml +8960 -9147
  45. data/spec/fixtures/default/icon.png +0 -0
  46. data/spec/integration/commands/push_command_spec.rb +1 -1
  47. metadata +31 -13
  48. data/generators/blank/config.ru +0 -3
  49. data/generators/bootstrap3/config.ru +0 -3
  50. data/generators/cloned/config.ru +0 -3
  51. data/generators/foundation5/config.ru +0 -3
  52. data/generators/line_case/config.ru +0 -3
  53. data/lib/locomotive/wagon/tools/deployment_connection.rb +0 -120
  54. data/lib/locomotive/wagon/tools/hosting_api.rb +0 -117
@@ -14,18 +14,18 @@ module Locomotive
14
14
  %i(name slug description label_field_name fields
15
15
  order_by order_direction group_by
16
16
  public_submission_enabled public_submission_accounts
17
- raw_item_template)
17
+ raw_item_template display_settings)
18
18
  end
19
19
 
20
20
  def fields
21
21
  return @fields if @fields
22
22
 
23
- @fields = __getobj__.fields.no_associations.map { |f| ContentTypeFieldDecorator.new(f) }
23
+ @fields = __getobj__.fields.no_associations.map { |f| ContentTypeFieldDecorator.new(f, @existing_fields.include?(f.name)) }
24
24
 
25
25
  @existing_fields.each do |name|
26
26
  # the field exists remotely but does not exist locally, delete it
27
27
  if __getobj__.fields.by_name(name).nil?
28
- @fields << { name: name, _destroy: true }
28
+ @fields.insert(0, { name: name, _destroy: true })
29
29
  end
30
30
  end
31
31
 
@@ -56,6 +56,10 @@ module Locomotive
56
56
  self[:raw_item_template]
57
57
  end
58
58
 
59
+ def display_settings
60
+ self[:display_settings]
61
+ end
62
+
59
63
  def with_relationships?
60
64
  __getobj__.fields.associations.count > 0
61
65
  end
@@ -5,6 +5,11 @@ module Locomotive
5
5
 
6
6
  include ToHashConcern
7
7
 
8
+ def initialize(entity, persisted = false)
9
+ @persisted = persisted
10
+ super(entity)
11
+ end
12
+
8
13
  def __attributes__
9
14
  %i(name type label hint required localized unique position
10
15
  text_formatting select_options
@@ -50,7 +55,7 @@ module Locomotive
50
55
  end
51
56
 
52
57
  def select_options
53
- return nil unless type.to_sym == :select
58
+ return nil if type.to_sym != :select || @persisted
54
59
 
55
60
  @_select_options ||= __getobj__.select_options.all.map { |o| SelectOptionDecorator.new(o) }
56
61
  end
@@ -28,5 +28,13 @@ module Locomotive
28
28
 
29
29
  end
30
30
 
31
+ class IconSiteDecorator < SiteDecorator
32
+
33
+ def __attributes__
34
+ %i(picture)
35
+ end
36
+
37
+ end
38
+
31
39
  end
32
40
  end
@@ -87,4 +87,4 @@ module Locomotive
87
87
  end
88
88
  end
89
89
  end
90
- end
90
+ end
@@ -24,4 +24,4 @@ module Locomotive
24
24
  end
25
25
  end
26
26
  end
27
- end
27
+ end
@@ -110,8 +110,6 @@ module Locomotive
110
110
  path: path,
111
111
  icon: icon && File.exists?(icon) ? icon : nil,
112
112
  options: class_options_to_json(template)
113
-
114
-
115
113
  }
116
114
  end.to_json
117
115
  end
@@ -0,0 +1,122 @@
1
+ require 'psych'
2
+ require 'stringio'
3
+
4
+ # Public: A Psych extension to enable choosing output styles for specific
5
+ # objects.
6
+ #
7
+ # Thanks to Tenderlove for help in <http://stackoverflow.com/q/9640277/11687>
8
+ #
9
+ # Examples
10
+ #
11
+ # data = {
12
+ # response: { body: StyledYAML.literal(json_string), status: 200 },
13
+ # person: StyledYAML.inline({ 'name' => 'Stevie', 'age' => 12 }),
14
+ # array: StyledYAML.inline(%w[ apples bananas oranges ])
15
+ # }
16
+ #
17
+ # StyledYAML.dump data, $stdout
18
+ #
19
+ module StyledYAML
20
+ # Tag strings to be output using literal style
21
+ def self.literal obj
22
+ obj.extend LiteralScalar
23
+ return obj
24
+ end
25
+
26
+ # http://www.yaml.org/spec/1.2/spec.html#id2795688
27
+ module LiteralScalar
28
+ def yaml_style() Psych::Nodes::Scalar::LITERAL end
29
+ end
30
+
31
+ # Tag Hashes or Arrays to be output all on one line
32
+ def self.inline obj
33
+ case obj
34
+ when Hash then obj.extend FlowMapping
35
+ when Array then obj.extend FlowSequence
36
+ else
37
+ warn "#{self}: unrecognized type to inline (#{obj.class.name})"
38
+ end
39
+ return obj
40
+ end
41
+
42
+ # http://www.yaml.org/spec/1.2/spec.html#id2790832
43
+ module FlowMapping
44
+ def yaml_style() Psych::Nodes::Mapping::FLOW end
45
+ end
46
+
47
+ # http://www.yaml.org/spec/1.2/spec.html#id2790320
48
+ module FlowSequence
49
+ def yaml_style() Psych::Nodes::Sequence::FLOW end
50
+ end
51
+
52
+ # Custom tree builder class to recognize scalars tagged with `yaml_style`
53
+ class TreeBuilder < Psych::TreeBuilder
54
+ attr_writer :next_sequence_or_mapping_style
55
+
56
+ def initialize(*args)
57
+ super
58
+ @next_sequence_or_mapping_style = nil
59
+ end
60
+
61
+ def next_sequence_or_mapping_style default_style
62
+ style = @next_sequence_or_mapping_style || default_style
63
+ @next_sequence_or_mapping_style = nil
64
+ style
65
+ end
66
+
67
+ def scalar value, anchor, tag, plain, quoted, style
68
+ if style_any?(style) and value.respond_to?(:yaml_style) and style = value.yaml_style
69
+ if style_literal? style
70
+ plain = false
71
+ quoted = true
72
+ end
73
+ end
74
+ super
75
+ end
76
+
77
+ def style_any?(style) Psych::Nodes::Scalar::ANY == style end
78
+
79
+ def style_literal?(style) Psych::Nodes::Scalar::LITERAL == style end
80
+
81
+ %w[sequence mapping].each do |type|
82
+ class_eval <<-RUBY
83
+ def start_#{type}(anchor, tag, implicit, style)
84
+ style = next_sequence_or_mapping_style(style)
85
+ super
86
+ end
87
+ RUBY
88
+ end
89
+ end
90
+
91
+ # Custom tree class to handle Hashes and Arrays tagged with `yaml_style`
92
+ class YAMLTree < Psych::Visitors::YAMLTree
93
+ %w[Hash Array Psych_Set Psych_Omap].each do |klass|
94
+ class_eval <<-RUBY
95
+ def visit_#{klass} o
96
+ if o.respond_to? :yaml_style
97
+ @emitter.next_sequence_or_mapping_style = o.yaml_style
98
+ end
99
+ super
100
+ end
101
+ RUBY
102
+ end
103
+ end
104
+
105
+ # A Psych.dump alternative that uses the custom TreeBuilder
106
+ def self.dump obj, io = nil, options = {}
107
+ real_io = io || StringIO.new(''.encode('utf-8'))
108
+ visitor = YAMLTree.new(options, TreeBuilder.new)
109
+ visitor << obj
110
+ ast = visitor.tree
111
+
112
+ begin
113
+ ast.yaml real_io
114
+ rescue
115
+ # The `yaml` method was introduced in later versions, so fall back to
116
+ # constructing a visitor
117
+ Psych::Visitors::Emitter.new(real_io).accept ast
118
+ end
119
+
120
+ io ? io : real_io.string
121
+ end
122
+ end
@@ -1,5 +1,5 @@
1
1
  module Locomotive
2
2
  module Wagon
3
- VERSION = '2.0.0-alpha.3'
3
+ VERSION = '2.0.0-beta.1'
4
4
  end
5
5
  end
@@ -80,21 +80,21 @@ module Locomotive
80
80
  # @param [ Hash ] connection_info The information to get connected to the remote site
81
81
  # @param [ Hash ] options The options passed to the pull process
82
82
  #
83
- def self.pull(path, connection_info, options = {})
84
- raise 'TODO'
85
- # self.require_mounter(path, false, options[:disable_misc])
86
-
87
- # connection_info[:uri] = "#{connection_info.delete(:host)}/locomotive/api"
88
-
89
- # _options = { console: true }.merge(options).symbolize_keys
90
- # _options[:only] = _options.delete(:resources)
91
-
92
- # reader = Locomotive::Mounter::Reader::Api.instance
93
- # self.validate_resources(_options[:only], reader.readers)
94
- # reader.run!(_options.merge(connection_info))
83
+ def self.pull(env, path, options = {}, shell)
84
+ require_relative 'wagon/commands/pull_command'
85
+ Locomotive::Wagon::PullCommand.pull(env, path, options, shell)
86
+ end
95
87
 
96
- # writer = Locomotive::Mounter::Writer::FileSystem.instance
97
- # writer.run!(_options.merge(mounting_point: reader.mounting_point, target_path: path))
88
+ # Synchronize the local content with the one from a remote Locomotive engine.
89
+ # by the config/deploy.yml file of the site and for a specific environment.
90
+ #
91
+ # @param [ String ] path The path of the site
92
+ # @param [ Hash ] connection_info The information to get connected to the remote site
93
+ # @param [ Hash ] options The options passed to the pull process
94
+ #
95
+ def self.sync(env, path, options = {})
96
+ require_relative 'wagon/commands/sync_command'
97
+ Locomotive::Wagon::SyncCommand.sync(env, path, options)
98
98
  end
99
99
 
100
100
  # Clone a site from a remote LocomotiveCMS engine.
@@ -104,56 +104,21 @@ module Locomotive
104
104
  # @param [ Hash ] connection_info The host, email and password needed to access the remote engine
105
105
  # @param [ Hash ] options The options for the API reader
106
106
  #
107
- def self.clone(name, path, connection_info, options = {})
108
- raise 'TODO'
109
- # target_path = File.expand_path(File.join(path, name))
110
-
111
- # if File.exists?(target_path)
112
- # puts "Path already exists. If it's an existing site, you might want to pull instead of clone."
113
- # return false
114
- # end
115
-
116
- # # generate an almost blank site
117
- # require 'locomotive/wagon/generators/site'
118
- # generator = Locomotive::Wagon::Generators::Site::Cloned
119
- # generator.start [name, path, true, connection_info.symbolize_keys]
120
-
121
- # # pull the remote site
122
- # self.pull(target_path, options.merge(connection_info).with_indifferent_access, { disable_misc: true })
107
+ def self.clone(name, path, options, shell)
108
+ require_relative 'wagon/commands/clone_command'
109
+ Locomotive::Wagon::CloneCommand.clone(name, path, options, shell)
123
110
  end
124
111
 
125
112
  # Destroy a remote site
126
113
  #
114
+ # @param [ String ] env The environment we use to deploy the site to
127
115
  # @param [ String ] path The path of the site
128
- # @param [ Hash ] connection_info The information to get connected to the remote site
129
- # @param [ Hash ] options The options passed to the push process
116
+ # @param [ Hash ] options The options passed to the destroy command
130
117
  #
131
- def self.destroy(path, connection_info, options = {})
132
- raise 'TODO'
133
- # self.require_mounter(path)
134
-
135
- # connection_info['uri'] = "#{connection_info.delete('host')}/locomotive/api"
136
-
137
- # Locomotive::Mounter::EngineApi.set_token connection_info.symbolize_keys
138
- # Locomotive::Mounter::EngineApi.delete('/current_site.json')
118
+ def self.destroy(env, path, options = {})
119
+ require_relative 'wagon/commands/destroy_command'
120
+ Locomotive::Wagon::DestroyCommand.destroy(env, path, options)
139
121
  end
140
122
 
141
- # protected
142
-
143
- # def self.validate_resources(resources, writers_or_readers)
144
- # return if resources.nil?
145
-
146
- # # FIXME: for an unknown reason, when called from Cocoa, the resources are a string
147
- # resources = resources.map { |resource| resource.split(' ') }.flatten
148
-
149
- # valid_resources = writers_or_readers.map { |thing| thing.to_s.demodulize.gsub(/Writer$|Reader$/, '').underscore }
150
-
151
- # resources.each do |resource|
152
- # raise ArgumentError, "'#{resource}' resource not recognized. Valid resources are #{valid_resources.join(', ')}." unless valid_resources.include?(resource)
153
- # end
154
-
155
- # resources
156
- # end
157
-
158
123
  end
159
124
  end
@@ -25,8 +25,8 @@ Gem::Specification.new do |gem|
25
25
  gem.add_dependency 'rubyzip', '~> 1.1.7'
26
26
  gem.add_dependency 'netrc', '~> 0.10.3'
27
27
 
28
- gem.add_dependency 'locomotivecms_coal', '~> 1.0.0-alpha.3'
29
- gem.add_dependency 'locomotivecms_steam', '~> 1.0.0-alpha.2'
28
+ gem.add_dependency 'locomotivecms_coal', '~> 1.0.0-beta.2'
29
+ gem.add_dependency 'locomotivecms_steam', '~> 1.0.0-beta.2'
30
30
 
31
31
  gem.add_dependency 'listen', '~> 2.10.0'
32
32
  gem.add_dependency 'rack-livereload', '~> 0.3.15'
@@ -17,43 +17,35 @@ 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
- Content-Length:
26
- - '32'
27
- Etag:
28
- - W/"2245a1c3eefc06a0a39cca5e28eb4822"
25
+ X-Error-Detail:
26
+ - Invalid email or password.
29
27
  Cache-Control:
30
- - max-age=0, private, must-revalidate
28
+ - no-cache
31
29
  X-Request-Id:
32
- - c7ddea05-6b69-4454-8f5a-b667a8628ef9
30
+ - d5acbb60-75e3-4167-91bc-1f6aee2caaa9
33
31
  X-Runtime:
34
- - '0.590206'
35
- Connection:
36
- - keep-alive
37
- Server:
38
- - thin
32
+ - '0.405045'
33
+ Content-Length:
34
+ - '40'
39
35
  body:
40
36
  encoding: UTF-8
41
- string: '{"token":"ib6bXanDDnsFjyujf9Gt"}'
37
+ string: '{"message":"Invalid email or password."}'
42
38
  http_version:
43
- recorded_at: Mon, 25 May 2015 23:06:12 GMT
39
+ recorded_at: Tue, 11 Aug 2015 16:47:38 GMT
44
40
  - request:
45
- method: get
41
+ method: post
46
42
  uri: http://localhost:3000/locomotive/api/v3/my_account.json
47
43
  body:
48
44
  encoding: UTF-8
49
- string: auth_token=ib6bXanDDnsFjyujf9Gt
45
+ string: account%5Bemail%5D=john%40doe.net&account%5Bname%5D=John&account%5Bpassword%5D=asimplepassword
50
46
  headers:
51
47
  Accept:
52
48
  - application/json
53
- X-Locomotive-Account-Email:
54
- - john@doe.net
55
- X-Locomotive-Account-Token:
56
- - ib6bXanDDnsFjyujf9Gt
57
49
  Content-Type:
58
50
  - application/x-www-form-urlencoded
59
51
  Accept-Encoding:
@@ -62,75 +54,26 @@ http_interactions:
62
54
  - Ruby
63
55
  response:
64
56
  status:
65
- code: 200
66
- message: OK
57
+ code: 201
58
+ message: Created
67
59
  headers:
68
60
  Content-Type:
69
61
  - application/json
70
- Content-Length:
71
- - '250'
72
62
  Etag:
73
- - W/"77a6faa0568f7ba809893a63188e0841"
63
+ - W/"2af9bbd65bd5918efea9dd9fd195971d"
74
64
  Cache-Control:
75
65
  - max-age=0, private, must-revalidate
76
66
  X-Request-Id:
77
- - ea9681b4-a8ed-4c0e-86e7-da1824762b79
67
+ - 05621e5a-d0fc-4850-974b-025767e46794
78
68
  X-Runtime:
79
- - '0.087301'
80
- Connection:
81
- - keep-alive
82
- Server:
83
- - thin
84
- body:
85
- encoding: UTF-8
86
- string: '{"_id":"555b4492646964986c220000","created_at":"2015-05-19T14:11:30Z","updated_at":"2015-05-19T14:11:30Z","name":"John","email":"john@doe.net","locale":"en","api_key":"c17eb23cfde7a2f7f3d08689dd20470cf9bd95a8","super_admin":false,"local_admin":false}'
87
- http_version:
88
- recorded_at: Mon, 25 May 2015 23:06:12 GMT
89
- - request:
90
- method: get
91
- uri: http://localhost:3000/locomotive/api/v3/my_account.json
92
- body:
93
- encoding: UTF-8
94
- string: auth_token=ib6bXanDDnsFjyujf9Gt
95
- headers:
96
- Accept:
97
- - application/json
98
- X-Locomotive-Account-Email:
99
- - john@doe.net
100
- X-Locomotive-Account-Token:
101
- - ib6bXanDDnsFjyujf9Gt
102
- Content-Type:
103
- - application/x-www-form-urlencoded
104
- Accept-Encoding:
105
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
106
- User-Agent:
107
- - Ruby
108
- response:
109
- status:
110
- code: 200
111
- message: OK
112
- headers:
113
- Content-Type:
114
- - application/json
69
+ - '0.078440'
115
70
  Content-Length:
116
71
  - '250'
117
- Etag:
118
- - W/"77a6faa0568f7ba809893a63188e0841"
119
- Cache-Control:
120
- - max-age=0, private, must-revalidate
121
- X-Request-Id:
122
- - 736fdff0-e01e-424f-9071-619960ad972f
123
- X-Runtime:
124
- - '0.013798'
125
- Connection:
126
- - keep-alive
127
- Server:
128
- - thin
129
72
  body:
130
73
  encoding: UTF-8
131
- string: '{"_id":"555b4492646964986c220000","created_at":"2015-05-19T14:11:30Z","updated_at":"2015-05-19T14:11:30Z","name":"John","email":"john@doe.net","locale":"en","api_key":"c17eb23cfde7a2f7f3d08689dd20470cf9bd95a8","super_admin":false,"local_admin":false}'
74
+ string: '{"_id":"55ca272a87f6432b4e000000","created_at":"2015-08-11T16:47:38Z","updated_at":"2015-08-11T16:47:38Z","name":"John","email":"john@doe.net","locale":"en","api_key":"3e4794ac44f4cbf9efc9277eb59384120418c02b","super_admin":false,"local_admin":false}'
132
75
  http_version:
133
- recorded_at: Mon, 25 May 2015 23:06:12 GMT
76
+ recorded_at: Tue, 11 Aug 2015 16:47:38 GMT
134
77
  - request:
135
78
  method: post
136
79
  uri: http://localhost:3000/locomotive/api/v3/tokens.json
@@ -153,40 +96,34 @@ http_interactions:
153
96
  headers:
154
97
  Content-Type:
155
98
  - application/json
156
- Content-Length:
157
- - '32'
158
99
  Etag:
159
- - W/"6b081cb1b0d50389aeec251b56dc5e74"
100
+ - W/"3b6ceb0d2ba232a8d48dd0dc8f702ef4"
160
101
  Cache-Control:
161
102
  - max-age=0, private, must-revalidate
162
103
  X-Request-Id:
163
- - a19a725f-16bd-4e61-9965-0663181e5262
104
+ - 2bed1193-24c8-46d0-bcf3-6e462c4177ee
164
105
  X-Runtime:
165
- - '0.014548'
166
- Connection:
167
- - keep-alive
168
- Server:
169
- - thin
106
+ - '0.016216'
107
+ Content-Length:
108
+ - '32'
170
109
  body:
171
110
  encoding: UTF-8
172
- string: '{"token":"6UA3Po7vVz4Ry34swEqa"}'
111
+ string: '{"token":"xM_3r1zn2aQAinPFqSvd"}'
173
112
  http_version:
174
- recorded_at: Mon, 25 May 2015 23:06:12 GMT
113
+ recorded_at: Tue, 11 Aug 2015 16:47:38 GMT
175
114
  - request:
176
115
  method: get
177
- uri: http://localhost:3000/locomotive/api/v3/my_account.json
116
+ uri: http://localhost:3000/locomotive/api/v3/my_account.json?auth_token=xM_3r1zn2aQAinPFqSvd
178
117
  body:
179
- encoding: UTF-8
180
- string: auth_token=6UA3Po7vVz4Ry34swEqa
118
+ encoding: US-ASCII
119
+ string: ''
181
120
  headers:
182
121
  Accept:
183
122
  - application/json
184
123
  X-Locomotive-Account-Email:
185
124
  - admin@locomotivecms.com
186
125
  X-Locomotive-Account-Token:
187
- - 6UA3Po7vVz4Ry34swEqa
188
- Content-Type:
189
- - application/x-www-form-urlencoded
126
+ - xM_3r1zn2aQAinPFqSvd
190
127
  Accept-Encoding:
191
128
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
192
129
  User-Agent:
@@ -198,41 +135,35 @@ http_interactions:
198
135
  headers:
199
136
  Content-Type:
200
137
  - application/json
201
- Content-Length:
202
- - '264'
203
138
  Etag:
204
- - W/"cd64b967426892bd75445b74968ee0e7"
139
+ - W/"52bd05e384c279a85dca7d54c93622f3"
205
140
  Cache-Control:
206
141
  - max-age=0, private, must-revalidate
207
142
  X-Request-Id:
208
- - 1637260c-7fdc-47cc-b2cb-4b32a976146a
143
+ - 1ff524e7-715b-4a2d-b282-281975ca8f94
209
144
  X-Runtime:
210
- - '0.014046'
211
- Connection:
212
- - keep-alive
213
- Server:
214
- - thin
145
+ - '0.050613'
146
+ Content-Length:
147
+ - '264'
215
148
  body:
216
149
  encoding: UTF-8
217
- string: '{"_id":"5555b35a646964e1ca000000","created_at":"2015-05-15T08:50:34Z","updated_at":"2015-05-21T11:12:17Z","name":"John
150
+ string: '{"_id":"55c9f4a387f6432a1e000000","created_at":"2015-08-11T13:12:03Z","updated_at":"2015-08-11T13:12:39Z","name":"John
218
151
  Doe","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":false,"local_admin":true}'
219
152
  http_version:
220
- recorded_at: Mon, 25 May 2015 23:06:12 GMT
153
+ recorded_at: Tue, 11 Aug 2015 16:47:38 GMT
221
154
  - request:
222
155
  method: get
223
- uri: http://localhost:3000/locomotive/api/v3/my_account.json
156
+ uri: http://localhost:3000/locomotive/api/v3/my_account.json?auth_token=xM_3r1zn2aQAinPFqSvd
224
157
  body:
225
- encoding: UTF-8
226
- string: auth_token=6UA3Po7vVz4Ry34swEqa
158
+ encoding: US-ASCII
159
+ string: ''
227
160
  headers:
228
161
  Accept:
229
162
  - application/json
230
163
  X-Locomotive-Account-Email:
231
164
  - admin@locomotivecms.com
232
165
  X-Locomotive-Account-Token:
233
- - 6UA3Po7vVz4Ry34swEqa
234
- Content-Type:
235
- - application/x-www-form-urlencoded
166
+ - xM_3r1zn2aQAinPFqSvd
236
167
  Accept-Encoding:
237
168
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
238
169
  User-Agent:
@@ -244,24 +175,20 @@ http_interactions:
244
175
  headers:
245
176
  Content-Type:
246
177
  - application/json
247
- Content-Length:
248
- - '264'
249
178
  Etag:
250
- - W/"cd64b967426892bd75445b74968ee0e7"
179
+ - W/"52bd05e384c279a85dca7d54c93622f3"
251
180
  Cache-Control:
252
181
  - max-age=0, private, must-revalidate
253
182
  X-Request-Id:
254
- - 286b83c2-dc57-4ff6-b93e-69d4b083b7ef
183
+ - 41e6457b-6fba-4e25-b58d-43bd072c22bd
255
184
  X-Runtime:
256
- - '0.019133'
257
- Connection:
258
- - keep-alive
259
- Server:
260
- - thin
185
+ - '0.014797'
186
+ Content-Length:
187
+ - '264'
261
188
  body:
262
189
  encoding: UTF-8
263
- string: '{"_id":"5555b35a646964e1ca000000","created_at":"2015-05-15T08:50:34Z","updated_at":"2015-05-21T11:12:17Z","name":"John
190
+ string: '{"_id":"55c9f4a387f6432a1e000000","created_at":"2015-08-11T13:12:03Z","updated_at":"2015-08-11T13:12:39Z","name":"John
264
191
  Doe","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":false,"local_admin":true}'
265
192
  http_version:
266
- recorded_at: Mon, 25 May 2015 23:06:12 GMT
193
+ recorded_at: Tue, 11 Aug 2015 16:47:38 GMT
267
194
  recorded_with: VCR 2.9.3