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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +1 -1
- data/generators/content_type/app/content_types/%slug%.yml.tt +1 -1
- data/lib/locomotive/wagon.rb +1 -1
- data/lib/locomotive/wagon/commands/concerns/api_concern.rb +2 -0
- data/lib/locomotive/wagon/commands/loggers/push_logger.rb +4 -22
- data/lib/locomotive/wagon/commands/pull_sub_commands/concerns/assets_concern.rb +8 -6
- data/lib/locomotive/wagon/commands/pull_sub_commands/pull_content_entries_command.rb +1 -1
- data/lib/locomotive/wagon/commands/pull_sub_commands/pull_content_types_command.rb +1 -1
- data/lib/locomotive/wagon/commands/pull_sub_commands/pull_theme_assets_command.rb +1 -1
- data/lib/locomotive/wagon/commands/push_command.rb +36 -2
- data/lib/locomotive/wagon/commands/push_sub_commands/push_base_command.rb +6 -5
- data/lib/locomotive/wagon/commands/push_sub_commands/push_pages_command.rb +1 -1
- data/lib/locomotive/wagon/commands/push_sub_commands/push_site_command.rb +9 -2
- data/lib/locomotive/wagon/decorators/content_type_field_decorator.rb +0 -2
- data/lib/locomotive/wagon/decorators/page_decorator.rb +7 -3
- data/lib/locomotive/wagon/decorators/site_decorator.rb +9 -3
- data/lib/locomotive/wagon/middlewares/error_page.rb +1 -1
- data/lib/locomotive/wagon/version.rb +1 -1
- data/locomotivecms_wagon.gemspec +2 -2
- data/spec/fixtures/cassettes/authenticate.yml +29 -31
- data/spec/fixtures/cassettes/push.yml +1184 -1147
- data/spec/unit/commands/pull_sub_commands/concerns/assets_concern_spec.rb +28 -0
- data/spec/unit/decorators/site_decorator_spec.rb +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6e7813188667f8439421a837787f0ca5e85b1bf
|
4
|
+
data.tar.gz: d7846774d2eb77655e96b1e7b57e98393b6147c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7e950c87f45d9a67d6512183940e5a06af167fcc4e8fe87b195f672cbceb6de795e93099c5865868b9191a6eec6f2f867531e8fef2c1fb2d39343c64f2a5f88
|
7
|
+
data.tar.gz: 7daa31a931589f899b29dbdd480d4324fb4e5e34e475a841b7267540a0eee64457c2907f925faba9e601fe5dcc7e86938629acc17918ddef65da127b5ffe2626
|
data/.gitignore
CHANGED
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: '
|
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']
|
data/lib/locomotive/wagon.rb
CHANGED
@@ -3,7 +3,7 @@ require_relative 'wagon/exceptions'
|
|
3
3
|
module Locomotive
|
4
4
|
module Wagon
|
5
5
|
|
6
|
-
DEFAULT_PLATFORM_URL = 'http://
|
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(
|
16
|
-
filename = "#{$
|
17
|
-
folder = case $
|
18
|
-
when 'assets', 'pages' then File.join('samples', $
|
19
|
-
when 'theme' then $
|
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', '
|
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
|
|
@@ -32,17 +32,31 @@ module Locomotive::Wagon
|
|
32
32
|
def push
|
33
33
|
PushLogger.new if options[:verbose]
|
34
34
|
|
35
|
-
api_client =
|
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
|
-
|
37
|
-
|
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
|
-
|
10
|
+
UpdateSiteDecorator.new(entity)
|
11
11
|
end
|
12
12
|
|
13
13
|
def persist(decorated_entity)
|
14
14
|
_attributes = decorated_entity.to_hash
|
15
|
-
|
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
|
@@ -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
|
-
|
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
|
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
|
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
|
data/locomotivecms_wagon.gemspec
CHANGED
@@ -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
|
29
|
-
gem.add_dependency 'locomotivecms_steam', '~> 1.0.0
|
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
|
-
-
|
30
|
+
- 9fd5095f-e1f8-46bd-af70-4937d8952fa9
|
31
31
|
X-Runtime:
|
32
|
-
- '0.
|
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:
|
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/"
|
63
|
+
- W/"f11c118ac1f73d61c33c0fe3b83a4bbe"
|
64
64
|
Cache-Control:
|
65
65
|
- max-age=0, private, must-revalidate
|
66
66
|
X-Request-Id:
|
67
|
-
-
|
67
|
+
- 0d392097-4546-4dea-aed7-aa78812b2cc6
|
68
68
|
X-Runtime:
|
69
|
-
- '0.
|
69
|
+
- '0.076062'
|
70
70
|
Content-Length:
|
71
71
|
- '250'
|
72
72
|
body:
|
73
73
|
encoding: UTF-8
|
74
|
-
string: '{"_id":"
|
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:
|
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/"
|
100
|
+
- W/"a9163fdeb161e2c161f3a0f3efe49ba1"
|
101
101
|
Cache-Control:
|
102
102
|
- max-age=0, private, must-revalidate
|
103
103
|
X-Request-Id:
|
104
|
-
-
|
104
|
+
- 45b0e958-c517-473e-aabb-6c905328665a
|
105
105
|
X-Runtime:
|
106
|
-
- '0.
|
106
|
+
- '0.016623'
|
107
107
|
Content-Length:
|
108
108
|
- '32'
|
109
109
|
body:
|
110
110
|
encoding: UTF-8
|
111
|
-
string: '{"token":"
|
111
|
+
string: '{"token":"a2muK9TeBmVrpA5XrYQa"}'
|
112
112
|
http_version:
|
113
|
-
recorded_at:
|
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=
|
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
|
-
-
|
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/"
|
139
|
+
- W/"eca3fa55990117bf008694b4895520d9"
|
140
140
|
Cache-Control:
|
141
141
|
- max-age=0, private, must-revalidate
|
142
142
|
X-Request-Id:
|
143
|
-
-
|
143
|
+
- fc3ee76e-4de2-4487-bfc4-9b51d7842cd7
|
144
144
|
X-Runtime:
|
145
|
-
- '0.
|
145
|
+
- '0.027375'
|
146
146
|
Content-Length:
|
147
|
-
- '
|
147
|
+
- '261'
|
148
148
|
body:
|
149
149
|
encoding: UTF-8
|
150
|
-
string: '{"_id":"
|
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:
|
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=
|
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
|
-
-
|
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/"
|
178
|
+
- W/"eca3fa55990117bf008694b4895520d9"
|
180
179
|
Cache-Control:
|
181
180
|
- max-age=0, private, must-revalidate
|
182
181
|
X-Request-Id:
|
183
|
-
-
|
182
|
+
- f29a44e9-95b9-46ca-950c-522f4fc36cee
|
184
183
|
X-Runtime:
|
185
|
-
- '0.
|
184
|
+
- '0.013873'
|
186
185
|
Content-Length:
|
187
|
-
- '
|
186
|
+
- '261'
|
188
187
|
body:
|
189
188
|
encoding: UTF-8
|
190
|
-
string: '{"_id":"
|
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:
|
191
|
+
recorded_at: Sat, 03 Oct 2015 22:51:13 GMT
|
194
192
|
recorded_with: VCR 2.9.3
|