locomotivecms_wagon 2.0.0.pre.beta.2 → 2.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/Gemfile +1 -1
  4. data/generators/content_type/app/content_types/%slug%.yml.tt +1 -1
  5. data/lib/locomotive/wagon.rb +1 -1
  6. data/lib/locomotive/wagon/commands/concerns/api_concern.rb +2 -0
  7. data/lib/locomotive/wagon/commands/loggers/push_logger.rb +4 -22
  8. data/lib/locomotive/wagon/commands/pull_sub_commands/concerns/assets_concern.rb +8 -6
  9. data/lib/locomotive/wagon/commands/pull_sub_commands/pull_content_entries_command.rb +1 -1
  10. data/lib/locomotive/wagon/commands/pull_sub_commands/pull_content_types_command.rb +1 -1
  11. data/lib/locomotive/wagon/commands/pull_sub_commands/pull_theme_assets_command.rb +1 -1
  12. data/lib/locomotive/wagon/commands/push_command.rb +36 -2
  13. data/lib/locomotive/wagon/commands/push_sub_commands/push_base_command.rb +6 -5
  14. data/lib/locomotive/wagon/commands/push_sub_commands/push_pages_command.rb +1 -1
  15. data/lib/locomotive/wagon/commands/push_sub_commands/push_site_command.rb +9 -2
  16. data/lib/locomotive/wagon/decorators/content_type_field_decorator.rb +0 -2
  17. data/lib/locomotive/wagon/decorators/page_decorator.rb +7 -3
  18. data/lib/locomotive/wagon/decorators/site_decorator.rb +9 -3
  19. data/lib/locomotive/wagon/middlewares/error_page.rb +1 -1
  20. data/lib/locomotive/wagon/version.rb +1 -1
  21. data/locomotivecms_wagon.gemspec +2 -2
  22. data/spec/fixtures/cassettes/authenticate.yml +29 -31
  23. data/spec/fixtures/cassettes/push.yml +1184 -1147
  24. data/spec/unit/commands/pull_sub_commands/concerns/assets_concern_spec.rb +28 -0
  25. data/spec/unit/decorators/site_decorator_spec.rb +1 -1
  26. metadata +8 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec11f1311f000e44d0d199967eaf73c25048c83d
4
- data.tar.gz: 701ba6761d428edf3d03a76254bc7558b331054f
3
+ metadata.gz: d6e7813188667f8439421a837787f0ca5e85b1bf
4
+ data.tar.gz: d7846774d2eb77655e96b1e7b57e98393b6147c1
5
5
  SHA512:
6
- metadata.gz: bf8014572c5c1d78c63e93a0a2b5fe09c3d035b8f44d49e9a5ff4b123c2e21f83905949166f0712c84a4d7475fa509aec825cbaaf6645f12d4befd4ab138af1f
7
- data.tar.gz: 382c96d36f76196e2ffd0bb8c0fecdfdbe9261cb28c0114e6b81a9c5b81e1fa530814edccdfe010f898713e51f69663ea201cf1ffb3e7e63be9469254fc90507
6
+ metadata.gz: d7e950c87f45d9a67d6512183940e5a06af167fcc4e8fe87b195f672cbceb6de795e93099c5865868b9191a6eec6f2f867531e8fef2c1fb2d39343c64f2a5f88
7
+ data.tar.gz: 7daa31a931589f899b29dbdd480d4324fb4e5e34e475a841b7267540a0eee64457c2907f925faba9e601fe5dcc7e86938629acc17918ddef65da127b5ffe2626
data/.gitignore CHANGED
@@ -12,6 +12,7 @@ Gemfile.lock
12
12
  InstalledFiles
13
13
  _yardoc
14
14
  coverage
15
+ bin/wagon_dev.rb
15
16
  doc/
16
17
  lib/bundler/man
17
18
  pkg
data/Gemfile CHANGED
@@ -8,7 +8,7 @@ gem 'rb-fsevent', '~> 0.9.1'
8
8
  gem 'therubyracer'
9
9
 
10
10
  # Development
11
- # gem 'locomotivecms_steam', github: 'locomotivecms/steam', ref: '2650a1c', require: false
11
+ # gem 'locomotivecms_steam', github: 'locomotivecms/steam', ref: 'c487443', require: false
12
12
  # gem 'locomotivecms_coal', github: 'locomotivecms/coal', ref: '32b2844', require: false
13
13
  # gem 'locomotivecms_common', github: 'locomotivecms/common', ref: '3046b79893', require: false
14
14
 
@@ -43,7 +43,7 @@ fields: <% config[:fields].each_with_index do |field, index| %>
43
43
  required: <%= index == 0 ? true : field.required %>
44
44
  hint: Explanatory text displayed in the back office
45
45
  localized: <%= field.localized %><% if field.type == 'text' %>
46
- # text_formatting: html # html (uses rich text editor) or text (uses plain text editor)<% end -%><% if field.type == 'select' -%>
46
+ # text_formatting: html # html (uses rich text editor), markdown or text (uses plain text editor)<% end -%><% if field.type == 'select' -%>
47
47
  # if localized, use
48
48
  # en: ['option1_en', 'option2_en']
49
49
  # fr: ['option1_fr', 'option2_fr']
@@ -3,7 +3,7 @@ require_relative 'wagon/exceptions'
3
3
  module Locomotive
4
4
  module Wagon
5
5
 
6
- DEFAULT_PLATFORM_URL = 'http://www.lvh.me:3000'.freeze
6
+ DEFAULT_PLATFORM_URL = 'http://locomotive.works'.freeze
7
7
 
8
8
  # Authenticate an user to the Hosting platform.
9
9
  # If the user does not exist, then create an account for her/him.
@@ -19,6 +19,8 @@ module Locomotive::Wagon
19
19
  @api_site_client = Locomotive::Coal::Client.new(_host, _credentials, _options)
20
20
  end
21
21
 
22
+ alias :build_api_site_client :api_site_client
23
+
22
24
  # Host (+ port) extracted from the platform_url instance variable.
23
25
  # If port equals 80, do not add it to the host.
24
26
  #
@@ -18,6 +18,10 @@ module Locomotive::Wagon
18
18
  log "persisting #{event.payload[:label]}", :white, 2, true
19
19
  end
20
20
 
21
+ subscribe :warning do |event|
22
+ log "Warning: #{event.payload[:message]}", :yellow
23
+ end
24
+
21
25
  subscribe :skip_persisting do |event|
22
26
  log ' [' + 'skip'.colorize(:yellow) + ']'
23
27
  end
@@ -34,32 +38,10 @@ module Locomotive::Wagon
34
38
 
35
39
  private
36
40
 
37
- # def log(message, color = nil, ident = nil, print = false)
38
- # ident = ' ' * (ident || 0)
39
-
40
- # message = "#{ident}#{message.gsub("\n", "\n" + ident)}"
41
- # message = message.colorize(color) if color
42
-
43
- # if print
44
- # print message
45
- # else
46
- # puts message
47
- # end
48
- # end
49
-
50
41
  def subscribe(action = nil, &block)
51
42
  _subscribe('push', action, &block)
52
43
  end
53
44
 
54
- # def subscribe(action = nil, &block)
55
- # name = ['wagon', 'push', [*action]].flatten.compact.join('.')
56
-
57
- # ActiveSupport::Notifications.subscribe(name) do |*args|
58
- # event = ActiveSupport::Notifications::Event.new *args
59
- # yield(event)
60
- # end
61
- # end
62
-
63
45
  end
64
46
 
65
47
  end
@@ -4,6 +4,8 @@ module Locomotive::Wagon
4
4
 
5
5
  module AssetsConcern
6
6
 
7
+ REGEX = /(https?:\/\/\S+)?\/sites\/[0-9a-f]{24}\/(assets|pages|theme|content_entry[0-9a-f]{24})\/(([^;.]+)\/)*([a-zA-Z_\-0-9.]+)\.([A-Za-z]{2,})/
8
+
7
9
  # The content assets on the remote engine follows the format: /sites/<id>/assets/<type>/<file>
8
10
  # This method replaces these urls by their local representation. <type>/<file>
9
11
  #
@@ -12,16 +14,16 @@ module Locomotive::Wagon
12
14
  def replace_asset_urls(content)
13
15
  return '' if content.blank?
14
16
 
15
- content.force_encoding('utf-8').gsub(/\/sites\/[0-9a-f]{24}\/(assets|pages|theme|content_entry[0-9a-f]{24})\/(([^;.]+)\/)*([a-zA-Z_\-0-9]+)\.([a-z]{2,3})/) do |url|
16
- filename = "#{$4}.#{$5}"
17
- folder = case $1
18
- when 'assets', 'pages' then File.join('samples', $1)
19
- when 'theme' then $3
17
+ content.force_encoding('utf-8').gsub(REGEX) do |url|
18
+ filename = "#{$5}.#{$6}"
19
+ folder = case $2
20
+ when 'assets', 'pages' then File.join('samples', $2)
21
+ when 'theme' then $4
20
22
  when /\Acontent_entry/ then File.join('samples', 'content_entries')
21
23
  end
22
24
 
23
25
  if filepath = write_asset(url, File.join(path, 'public', folder, filename))
24
- File.join('', folder, File.basename(filepath))
26
+ File.join('', folder, File.basename(filepath)).to_s
25
27
  else
26
28
  ''
27
29
  end
@@ -47,7 +47,7 @@ module Locomotive::Wagon
47
47
  def fetch_content_types(&block)
48
48
  api_client.content_types.all.each do |content_type|
49
49
  content_type.attributes['localized_names'] = content_type.fields.map { |f| f['localized'] ? f['name'] : nil }.compact
50
- content_type.attributes['urls_names'] = content_type.fields.map { |f| %w(file text).include?(f['type']) ? f['name'] : nil }.compact
50
+ content_type.attributes['urls_names'] = content_type.fields.map { |f| %w(file string text).include?(f['type']) ? f['name'] : nil }.compact
51
51
  yield(content_type)
52
52
  end
53
53
  end
@@ -26,7 +26,7 @@ module Locomotive::Wagon
26
26
  end
27
27
 
28
28
  def field_yaml_attributes(field)
29
- attributes = field.slice('label', 'type', 'required', 'hint', 'localized', 'select_options', 'class_name', 'inverse_of', 'ui_enabled')
29
+ attributes = field.slice('label', 'type', 'required', 'hint', 'localized', 'select_options', 'target', 'inverse_of', 'ui_enabled')
30
30
 
31
31
  clean_attributes(attributes)
32
32
 
@@ -21,7 +21,7 @@ module Locomotive::Wagon
21
21
  private
22
22
 
23
23
  def theme_asset_filepath(asset)
24
- File.join('public', asset.folder, asset.local_path)
24
+ File.join('public', asset.local_path)
25
25
  end
26
26
 
27
27
  end
@@ -32,17 +32,31 @@ module Locomotive::Wagon
32
32
  def push
33
33
  PushLogger.new if options[:verbose]
34
34
 
35
- api_client = api_site_client(connection_information)
35
+ api_client = build_api_site_client(connection_information)
36
+
37
+ validate!
36
38
 
37
39
  content_assets_pusher = Locomotive::Wagon::PushContentAssetsCommand.new(api_client, steam_services)
38
40
 
39
41
  each_resource do |klass|
40
- klass.push(api_client, steam_services, content_assets_pusher)
42
+ klass.push(api_client, steam_services, content_assets_pusher, remote_site)
41
43
  end
42
44
  end
43
45
 
44
46
  private
45
47
 
48
+ # To push all the other resources, the big requirement is to
49
+ # have the same locales between the local site and the remote one.
50
+ def validate!
51
+ if local_site.default_locale != remote_site.default_locale && remote_site.edited?
52
+ raise "Your Wagon site locale (#{local_site.default_locale}) is not the same as the one in the back-office (#{remote_site.default_locale})."
53
+ end
54
+
55
+ if local_site.locales != remote_site.locales
56
+ instrument :warning, message: "Your Wagon site locales (#{local_site.locales.join(', ')}) are not the same as the ones in the back-office (#{remote_site.locales.join(', ')})."
57
+ end
58
+ end
59
+
46
60
  def each_resource
47
61
  RESOURCES.each do |name|
48
62
  next if !options[:resources].blank? && !options[:resources].include?(name)
@@ -109,6 +123,26 @@ module Locomotive::Wagon
109
123
  self.platform_url = url.blank? ? default : url
110
124
  end
111
125
 
126
+ def local_site
127
+ return @local_site if @local_site
128
+ @local_site = SiteDecorator.new(steam_services.repositories.site.first)
129
+ end
130
+
131
+ def remote_site
132
+ return @remote_site if @remote_site
133
+
134
+ attribute = nil
135
+
136
+ begin
137
+ attributes = @api_site_client.current_site.get.attributes
138
+ rescue Locomotive::Coal::UnknownResourceError
139
+ raise 'Sorry, we were unable to find your site on the remote platform. Check the information in your config/deploy.yml file.'
140
+ end
141
+
142
+ _site = Locomotive::Steam::Site.new(attributes)
143
+ @remote_site = SiteDecorator.new(_site)
144
+ end
145
+
112
146
  end
113
147
 
114
148
  end
@@ -1,13 +1,13 @@
1
1
  module Locomotive::Wagon
2
2
 
3
- class PushBaseCommand < Struct.new(:api_client, :steam_services, :content_assets_pusher)
3
+ class PushBaseCommand < Struct.new(:api_client, :steam_services, :content_assets_pusher, :remote_site)
4
4
 
5
5
  extend Forwardable
6
6
 
7
7
  def_delegators :steam_services, :current_site, :locale, :repositories
8
8
 
9
- def self.push(api_client, steam_services, content_assets_pusher)
10
- new(api_client, steam_services, content_assets_pusher).push
9
+ def self.push(api_client, steam_services, content_assets_pusher, remote_site)
10
+ new(api_client, steam_services, content_assets_pusher, remote_site).push
11
11
  end
12
12
 
13
13
  def push
@@ -33,8 +33,9 @@ module Locomotive::Wagon
33
33
  instrument :persist_with_success
34
34
  rescue SkipPersistingException => e
35
35
  instrument :skip_persisting
36
- # rescue Exception => e
37
- # instrument :persist_with_error, message: e.message
36
+ rescue Exception => e
37
+ instrument :persist_with_error, message: e.message
38
+ raise e
38
39
  end
39
40
  end
40
41
  end
@@ -39,7 +39,7 @@ module Locomotive::Wagon
39
39
  private
40
40
 
41
41
  def _decorate(entity)
42
- PageDecorator.new(entity, default_locale, content_assets_pusher)
42
+ PageDecorator.new(entity, default_locale, content_assets_pusher, remote_site.edited?)
43
43
  end
44
44
 
45
45
  def remote_entity_id(fullpath)
@@ -7,12 +7,19 @@ module Locomotive::Wagon
7
7
  end
8
8
 
9
9
  def decorate(entity)
10
- IconSiteDecorator.new(entity)
10
+ UpdateSiteDecorator.new(entity)
11
11
  end
12
12
 
13
13
  def persist(decorated_entity)
14
14
  _attributes = decorated_entity.to_hash
15
- if !_attributes.empty? && api_client.current_site.get.attributes[:picture_url].nil?
15
+
16
+ # push the picture only if there is no existing remote picture
17
+ _attributes.delete(:picture) if remote_site['picture_url'].present?
18
+
19
+ # push the locales as long as there is no content on the remote site yet
20
+ _attributes.delete(:locales) if remote_site.edited?
21
+
22
+ if _attributes.present?
16
23
  api_client.current_site.update(_attributes)
17
24
  else
18
25
  raise SkipPersistingException.new
@@ -29,8 +29,6 @@ module Locomotive
29
29
  end
30
30
 
31
31
  def text_formatting
32
- return nil unless type == :text
33
-
34
32
  self[:text_formatting]
35
33
  end
36
34
 
@@ -6,10 +6,11 @@ module Locomotive
6
6
  include ToHashConcern
7
7
  include PersistAssetsConcern
8
8
 
9
- attr_accessor :__content_assets_pusher__
9
+ attr_accessor :__content_assets_pusher__, :__site_edited__
10
10
 
11
- def initialize(object, locale = nil, content_assets_pusher)
11
+ def initialize(object, locale = nil, content_assets_pusher, site_edited)
12
12
  self.__content_assets_pusher__ = content_assets_pusher
13
+ self.__site_edited__ = site_edited
13
14
  super(object, locale, nil)
14
15
  end
15
16
 
@@ -24,7 +25,10 @@ module Locomotive
24
25
  content_type
25
26
  template)
26
27
 
27
- _attributes -= %i(editable_elements) if persisted?
28
+ # remove the attributes that end-users might have modified in the back-office
29
+ if persisted? && __site_edited__
30
+ _attributes -= %i(title published listed position seo_title meta_keywords meta_description editable_elements)
31
+ end
28
32
 
29
33
  _attributes
30
34
  end
@@ -13,10 +13,12 @@ module Locomotive
13
13
  picture_path = __getobj__.picture
14
14
  if picture_path && File.exists?(picture_path)
15
15
  Locomotive::Coal::UploadIO.new(picture_path, nil, 'icon.png')
16
+ else
17
+ nil
16
18
  end
17
19
  end
18
20
 
19
- %i(robots_txt locales timezone seo_title meta_keywords meta_description).each do |name|
21
+ %i(robots_txt timezone seo_title meta_keywords meta_description).each do |name|
20
22
  define_method(name) do
21
23
  self[name]
22
24
  end
@@ -26,12 +28,16 @@ module Locomotive
26
28
  %i(name handle robots_txt locales timezone seo_title meta_keywords meta_description picture)
27
29
  end
28
30
 
31
+ def edited?
32
+ (self[:content_version].try(:to_i) || 0) > 0
33
+ end
34
+
29
35
  end
30
36
 
31
- class IconSiteDecorator < SiteDecorator
37
+ class UpdateSiteDecorator < SiteDecorator
32
38
 
33
39
  def __attributes__
34
- %i(picture)
40
+ %i(picture locales)
35
41
  end
36
42
 
37
43
  end
@@ -1,5 +1,5 @@
1
1
  require 'erb'
2
- require 'locomotive/steam/middlewares/threadsafe'
2
+ require 'locomotive/steam/middlewares/thread_safe'
3
3
  require 'locomotive/steam/middlewares/helpers'
4
4
 
5
5
  module Locomotive::Wagon
@@ -1,5 +1,5 @@
1
1
  module Locomotive
2
2
  module Wagon
3
- VERSION = '2.0.0-beta.2'
3
+ VERSION = '2.0.0.rc1'
4
4
  end
5
5
  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-beta.2'
29
- gem.add_dependency 'locomotivecms_steam', '~> 1.0.0-beta.3'
28
+ gem.add_dependency 'locomotivecms_coal', '~> 1.0.0.rc1'
29
+ gem.add_dependency 'locomotivecms_steam', '~> 1.0.0.rc1'
30
30
 
31
31
  gem.add_dependency 'listen', '~> 2.10.0'
32
32
  gem.add_dependency 'rack-livereload', '~> 0.3.15'
@@ -27,16 +27,16 @@ http_interactions:
27
27
  Cache-Control:
28
28
  - no-cache
29
29
  X-Request-Id:
30
- - d5acbb60-75e3-4167-91bc-1f6aee2caaa9
30
+ - 9fd5095f-e1f8-46bd-af70-4937d8952fa9
31
31
  X-Runtime:
32
- - '0.405045'
32
+ - '0.475989'
33
33
  Content-Length:
34
34
  - '40'
35
35
  body:
36
36
  encoding: UTF-8
37
37
  string: '{"message":"Invalid email or password."}'
38
38
  http_version:
39
- recorded_at: Tue, 11 Aug 2015 16:47:38 GMT
39
+ recorded_at: Sat, 03 Oct 2015 22:51:13 GMT
40
40
  - request:
41
41
  method: post
42
42
  uri: http://localhost:3000/locomotive/api/v3/my_account.json
@@ -60,20 +60,20 @@ http_interactions:
60
60
  Content-Type:
61
61
  - application/json
62
62
  Etag:
63
- - W/"2af9bbd65bd5918efea9dd9fd195971d"
63
+ - W/"f11c118ac1f73d61c33c0fe3b83a4bbe"
64
64
  Cache-Control:
65
65
  - max-age=0, private, must-revalidate
66
66
  X-Request-Id:
67
- - 05621e5a-d0fc-4850-974b-025767e46794
67
+ - 0d392097-4546-4dea-aed7-aa78812b2cc6
68
68
  X-Runtime:
69
- - '0.078440'
69
+ - '0.076062'
70
70
  Content-Length:
71
71
  - '250'
72
72
  body:
73
73
  encoding: UTF-8
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}'
74
+ string: '{"_id":"56105be187f6432346000000","created_at":"2015-10-03T22:51:13Z","updated_at":"2015-10-03T22:51:13Z","name":"John","email":"john@doe.net","locale":"en","api_key":"d4e4bcc95dbaa0bc964fe5d759af3e17ae87b55f","super_admin":false,"local_admin":false}'
75
75
  http_version:
76
- recorded_at: Tue, 11 Aug 2015 16:47:38 GMT
76
+ recorded_at: Sat, 03 Oct 2015 22:51:13 GMT
77
77
  - request:
78
78
  method: post
79
79
  uri: http://localhost:3000/locomotive/api/v3/tokens.json
@@ -97,23 +97,23 @@ http_interactions:
97
97
  Content-Type:
98
98
  - application/json
99
99
  Etag:
100
- - W/"3b6ceb0d2ba232a8d48dd0dc8f702ef4"
100
+ - W/"a9163fdeb161e2c161f3a0f3efe49ba1"
101
101
  Cache-Control:
102
102
  - max-age=0, private, must-revalidate
103
103
  X-Request-Id:
104
- - 2bed1193-24c8-46d0-bcf3-6e462c4177ee
104
+ - 45b0e958-c517-473e-aabb-6c905328665a
105
105
  X-Runtime:
106
- - '0.016216'
106
+ - '0.016623'
107
107
  Content-Length:
108
108
  - '32'
109
109
  body:
110
110
  encoding: UTF-8
111
- string: '{"token":"xM_3r1zn2aQAinPFqSvd"}'
111
+ string: '{"token":"a2muK9TeBmVrpA5XrYQa"}'
112
112
  http_version:
113
- recorded_at: Tue, 11 Aug 2015 16:47:38 GMT
113
+ recorded_at: Sat, 03 Oct 2015 22:51:13 GMT
114
114
  - request:
115
115
  method: get
116
- uri: http://localhost:3000/locomotive/api/v3/my_account.json?auth_token=xM_3r1zn2aQAinPFqSvd
116
+ uri: http://localhost:3000/locomotive/api/v3/my_account.json?auth_token=a2muK9TeBmVrpA5XrYQa
117
117
  body:
118
118
  encoding: US-ASCII
119
119
  string: ''
@@ -123,7 +123,7 @@ http_interactions:
123
123
  X-Locomotive-Account-Email:
124
124
  - admin@locomotivecms.com
125
125
  X-Locomotive-Account-Token:
126
- - xM_3r1zn2aQAinPFqSvd
126
+ - a2muK9TeBmVrpA5XrYQa
127
127
  Accept-Encoding:
128
128
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
129
129
  User-Agent:
@@ -136,24 +136,23 @@ http_interactions:
136
136
  Content-Type:
137
137
  - application/json
138
138
  Etag:
139
- - W/"52bd05e384c279a85dca7d54c93622f3"
139
+ - W/"eca3fa55990117bf008694b4895520d9"
140
140
  Cache-Control:
141
141
  - max-age=0, private, must-revalidate
142
142
  X-Request-Id:
143
- - 1ff524e7-715b-4a2d-b282-281975ca8f94
143
+ - fc3ee76e-4de2-4487-bfc4-9b51d7842cd7
144
144
  X-Runtime:
145
- - '0.050613'
145
+ - '0.027375'
146
146
  Content-Length:
147
- - '264'
147
+ - '261'
148
148
  body:
149
149
  encoding: UTF-8
150
- string: '{"_id":"55c9f4a387f6432a1e000000","created_at":"2015-08-11T13:12:03Z","updated_at":"2015-08-11T13:12:39Z","name":"John
151
- Doe","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":false,"local_admin":true}'
150
+ string: '{"_id":"56105bac87f6432326000000","created_at":"2015-10-03T22:50:20Z","updated_at":"2015-10-03T22:50:20Z","name":"Admin","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":false,"local_admin":true}'
152
151
  http_version:
153
- recorded_at: Tue, 11 Aug 2015 16:47:38 GMT
152
+ recorded_at: Sat, 03 Oct 2015 22:51:13 GMT
154
153
  - request:
155
154
  method: get
156
- uri: http://localhost:3000/locomotive/api/v3/my_account.json?auth_token=xM_3r1zn2aQAinPFqSvd
155
+ uri: http://localhost:3000/locomotive/api/v3/my_account.json?auth_token=a2muK9TeBmVrpA5XrYQa
157
156
  body:
158
157
  encoding: US-ASCII
159
158
  string: ''
@@ -163,7 +162,7 @@ http_interactions:
163
162
  X-Locomotive-Account-Email:
164
163
  - admin@locomotivecms.com
165
164
  X-Locomotive-Account-Token:
166
- - xM_3r1zn2aQAinPFqSvd
165
+ - a2muK9TeBmVrpA5XrYQa
167
166
  Accept-Encoding:
168
167
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
169
168
  User-Agent:
@@ -176,19 +175,18 @@ http_interactions:
176
175
  Content-Type:
177
176
  - application/json
178
177
  Etag:
179
- - W/"52bd05e384c279a85dca7d54c93622f3"
178
+ - W/"eca3fa55990117bf008694b4895520d9"
180
179
  Cache-Control:
181
180
  - max-age=0, private, must-revalidate
182
181
  X-Request-Id:
183
- - 41e6457b-6fba-4e25-b58d-43bd072c22bd
182
+ - f29a44e9-95b9-46ca-950c-522f4fc36cee
184
183
  X-Runtime:
185
- - '0.014797'
184
+ - '0.013873'
186
185
  Content-Length:
187
- - '264'
186
+ - '261'
188
187
  body:
189
188
  encoding: UTF-8
190
- string: '{"_id":"55c9f4a387f6432a1e000000","created_at":"2015-08-11T13:12:03Z","updated_at":"2015-08-11T13:12:39Z","name":"John
191
- Doe","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":false,"local_admin":true}'
189
+ string: '{"_id":"56105bac87f6432326000000","created_at":"2015-10-03T22:50:20Z","updated_at":"2015-10-03T22:50:20Z","name":"Admin","email":"admin@locomotivecms.com","locale":"en","api_key":"d49cd50f6f0d2b163f48fc73cb249f0244c37074","super_admin":false,"local_admin":true}'
192
190
  http_version:
193
- recorded_at: Tue, 11 Aug 2015 16:47:38 GMT
191
+ recorded_at: Sat, 03 Oct 2015 22:51:13 GMT
194
192
  recorded_with: VCR 2.9.3