spree_api_auth 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +11 -0
- data/.rspec +1 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +237 -0
- data/LICENSE +26 -0
- data/README.md +21 -0
- data/Rakefile +29 -0
- data/Versionfile +11 -0
- data/app/controllers/spree/api/v1/users_controller.rb +27 -0
- data/app/views/spree/api/v1/users/sign_in.rabl +2 -0
- data/app/views/spree/api/v1/users/sign_up.rabl +2 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +10 -0
- data/lib/generators/spree_api_auth/install/install_generator.rb +29 -0
- data/lib/spree_api_auth/controller_setup.rb +27 -0
- data/lib/spree_api_auth/engine.rb +22 -0
- data/lib/spree_api_auth.rb +3 -0
- data/script/rails +7 -0
- data/spec/spec_helper.rb +44 -0
- data/spree_api_auth.gemspec +28 -0
- metadata +23 -3
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,237 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
spree_api_auth (0.0.2)
|
5
|
+
spree_api (~> 1.1.3)
|
6
|
+
spree_auth (~> 1.1.3)
|
7
|
+
spree_core (~> 1.1.3)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: http://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actionmailer (3.2.8)
|
13
|
+
actionpack (= 3.2.8)
|
14
|
+
mail (~> 2.4.4)
|
15
|
+
actionpack (3.2.8)
|
16
|
+
activemodel (= 3.2.8)
|
17
|
+
activesupport (= 3.2.8)
|
18
|
+
builder (~> 3.0.0)
|
19
|
+
erubis (~> 2.7.0)
|
20
|
+
journey (~> 1.0.4)
|
21
|
+
rack (~> 1.4.0)
|
22
|
+
rack-cache (~> 1.2)
|
23
|
+
rack-test (~> 0.6.1)
|
24
|
+
sprockets (~> 2.1.3)
|
25
|
+
active_utils (1.0.4)
|
26
|
+
activesupport (>= 2.3.11)
|
27
|
+
i18n
|
28
|
+
activemerchant (1.20.4)
|
29
|
+
active_utils (>= 1.0.2)
|
30
|
+
activesupport (>= 2.3.11)
|
31
|
+
braintree (>= 2.0.0)
|
32
|
+
builder (>= 2.0.0)
|
33
|
+
i18n
|
34
|
+
json (>= 1.5.1)
|
35
|
+
money (<= 3.7.1)
|
36
|
+
activemodel (3.2.8)
|
37
|
+
activesupport (= 3.2.8)
|
38
|
+
builder (~> 3.0.0)
|
39
|
+
activerecord (3.2.8)
|
40
|
+
activemodel (= 3.2.8)
|
41
|
+
activesupport (= 3.2.8)
|
42
|
+
arel (~> 3.0.2)
|
43
|
+
tzinfo (~> 0.3.29)
|
44
|
+
activeresource (3.2.8)
|
45
|
+
activemodel (= 3.2.8)
|
46
|
+
activesupport (= 3.2.8)
|
47
|
+
activesupport (3.2.8)
|
48
|
+
i18n (~> 0.6)
|
49
|
+
multi_json (~> 1.0)
|
50
|
+
acts_as_list (0.1.4)
|
51
|
+
addressable (2.3.2)
|
52
|
+
arel (3.0.2)
|
53
|
+
aws-sdk (1.3.9)
|
54
|
+
httparty (~> 0.7)
|
55
|
+
json (~> 1.4)
|
56
|
+
nokogiri (>= 1.4.4)
|
57
|
+
uuidtools (~> 2.1)
|
58
|
+
bcrypt-ruby (3.0.1)
|
59
|
+
braintree (2.16.0)
|
60
|
+
builder (>= 2.0.0)
|
61
|
+
builder (3.0.0)
|
62
|
+
cancan (1.6.7)
|
63
|
+
capybara (1.0.1)
|
64
|
+
mime-types (>= 1.16)
|
65
|
+
nokogiri (>= 1.3.3)
|
66
|
+
rack (>= 1.0.0)
|
67
|
+
rack-test (>= 0.5.4)
|
68
|
+
selenium-webdriver (~> 2.0)
|
69
|
+
xpath (~> 0.1.4)
|
70
|
+
childprocess (0.3.5)
|
71
|
+
ffi (~> 1.0, >= 1.0.6)
|
72
|
+
cocaine (0.2.1)
|
73
|
+
columnize (0.3.6)
|
74
|
+
debugger (1.2.0)
|
75
|
+
columnize (>= 0.3.1)
|
76
|
+
debugger-linecache (~> 1.1.1)
|
77
|
+
debugger-ruby_core_source (~> 1.1.3)
|
78
|
+
debugger-linecache (1.1.2)
|
79
|
+
debugger-ruby_core_source (>= 1.1.1)
|
80
|
+
debugger-ruby_core_source (1.1.3)
|
81
|
+
deface (0.9.1)
|
82
|
+
nokogiri (~> 1.5.0)
|
83
|
+
rails (~> 3.1)
|
84
|
+
devise (2.0.4)
|
85
|
+
bcrypt-ruby (~> 3.0)
|
86
|
+
orm_adapter (~> 0.0.3)
|
87
|
+
railties (~> 3.1)
|
88
|
+
warden (~> 1.1.1)
|
89
|
+
diff-lcs (1.1.3)
|
90
|
+
erubis (2.7.0)
|
91
|
+
factory_girl (2.6.4)
|
92
|
+
activesupport (>= 2.3.9)
|
93
|
+
ffaker (1.12.1)
|
94
|
+
ffi (1.1.5)
|
95
|
+
highline (1.6.11)
|
96
|
+
hike (1.2.1)
|
97
|
+
httparty (0.8.3)
|
98
|
+
multi_json (~> 1.0)
|
99
|
+
multi_xml
|
100
|
+
i18n (0.6.0)
|
101
|
+
journey (1.0.4)
|
102
|
+
jquery-rails (2.0.3)
|
103
|
+
railties (>= 3.1.0, < 5.0)
|
104
|
+
thor (~> 0.14)
|
105
|
+
json (1.7.5)
|
106
|
+
kaminari (0.13.0)
|
107
|
+
actionpack (>= 3.0.0)
|
108
|
+
activesupport (>= 3.0.0)
|
109
|
+
railties (>= 3.0.0)
|
110
|
+
libwebsocket (0.1.5)
|
111
|
+
addressable
|
112
|
+
mail (2.4.4)
|
113
|
+
i18n (>= 0.4.0)
|
114
|
+
mime-types (~> 1.16)
|
115
|
+
treetop (~> 1.4.8)
|
116
|
+
mime-types (1.19)
|
117
|
+
money (3.7.1)
|
118
|
+
i18n (~> 0.4)
|
119
|
+
multi_json (1.3.6)
|
120
|
+
multi_xml (0.5.1)
|
121
|
+
nested_set (1.7.0)
|
122
|
+
activerecord (>= 3.0.0)
|
123
|
+
railties (>= 3.0.0)
|
124
|
+
nokogiri (1.5.5)
|
125
|
+
orm_adapter (0.0.7)
|
126
|
+
paperclip (2.7.0)
|
127
|
+
activerecord (>= 2.3.0)
|
128
|
+
activesupport (>= 2.3.2)
|
129
|
+
cocaine (>= 0.0.2)
|
130
|
+
mime-types
|
131
|
+
polyamorous (0.5.0)
|
132
|
+
activerecord (~> 3.0)
|
133
|
+
polyglot (0.3.3)
|
134
|
+
rabl (0.6.5)
|
135
|
+
activesupport (>= 2.3.14)
|
136
|
+
multi_json (~> 1.0)
|
137
|
+
rack (1.4.1)
|
138
|
+
rack-cache (1.2)
|
139
|
+
rack (>= 0.4)
|
140
|
+
rack-ssl (1.3.2)
|
141
|
+
rack
|
142
|
+
rack-test (0.6.1)
|
143
|
+
rack (>= 1.0)
|
144
|
+
rails (3.2.8)
|
145
|
+
actionmailer (= 3.2.8)
|
146
|
+
actionpack (= 3.2.8)
|
147
|
+
activerecord (= 3.2.8)
|
148
|
+
activeresource (= 3.2.8)
|
149
|
+
activesupport (= 3.2.8)
|
150
|
+
bundler (~> 1.0)
|
151
|
+
railties (= 3.2.8)
|
152
|
+
railties (3.2.8)
|
153
|
+
actionpack (= 3.2.8)
|
154
|
+
activesupport (= 3.2.8)
|
155
|
+
rack-ssl (~> 1.3.2)
|
156
|
+
rake (>= 0.8.7)
|
157
|
+
rdoc (~> 3.4)
|
158
|
+
thor (>= 0.14.6, < 2.0)
|
159
|
+
rake (0.9.2.2)
|
160
|
+
ransack (0.6.0)
|
161
|
+
actionpack (~> 3.0)
|
162
|
+
activerecord (~> 3.0)
|
163
|
+
polyamorous (~> 0.5.0)
|
164
|
+
rdoc (3.12)
|
165
|
+
json (~> 1.4)
|
166
|
+
rspec (2.11.0)
|
167
|
+
rspec-core (~> 2.11.0)
|
168
|
+
rspec-expectations (~> 2.11.0)
|
169
|
+
rspec-mocks (~> 2.11.0)
|
170
|
+
rspec-core (2.11.1)
|
171
|
+
rspec-expectations (2.11.2)
|
172
|
+
diff-lcs (~> 1.1.3)
|
173
|
+
rspec-mocks (2.11.2)
|
174
|
+
rspec-rails (2.11.0)
|
175
|
+
actionpack (>= 3.0)
|
176
|
+
activesupport (>= 3.0)
|
177
|
+
railties (>= 3.0)
|
178
|
+
rspec (~> 2.11.0)
|
179
|
+
rubyzip (0.9.9)
|
180
|
+
selenium-webdriver (2.25.0)
|
181
|
+
childprocess (>= 0.2.5)
|
182
|
+
libwebsocket (~> 0.1.3)
|
183
|
+
multi_json (~> 1.0)
|
184
|
+
rubyzip
|
185
|
+
spree_api (1.1.3)
|
186
|
+
rabl (= 0.6.5)
|
187
|
+
spree_auth (= 1.1.3)
|
188
|
+
spree_core (= 1.1.3)
|
189
|
+
spree_auth (1.1.3)
|
190
|
+
cancan (= 1.6.7)
|
191
|
+
devise (~> 2.0.0)
|
192
|
+
spree_core (= 1.1.3)
|
193
|
+
spree_core (1.1.3)
|
194
|
+
activemerchant (= 1.20.4)
|
195
|
+
acts_as_list (= 0.1.4)
|
196
|
+
aws-sdk (~> 1.3.4)
|
197
|
+
deface (>= 0.9.0)
|
198
|
+
ffaker (~> 1.12.0)
|
199
|
+
highline (= 1.6.11)
|
200
|
+
jquery-rails (~> 2.0.0)
|
201
|
+
kaminari (>= 0.13.0)
|
202
|
+
nested_set (= 1.7.0)
|
203
|
+
paperclip (~> 2.7)
|
204
|
+
rails (~> 3.2.6)
|
205
|
+
ransack (~> 0.6.0)
|
206
|
+
state_machine (= 1.1.2)
|
207
|
+
stringex (~> 1.3.2)
|
208
|
+
sprockets (2.1.3)
|
209
|
+
hike (~> 1.2)
|
210
|
+
rack (~> 1.0)
|
211
|
+
tilt (~> 1.1, != 1.3.0)
|
212
|
+
sqlite3 (1.3.6)
|
213
|
+
state_machine (1.1.2)
|
214
|
+
stringex (1.3.3)
|
215
|
+
thor (0.16.0)
|
216
|
+
tilt (1.3.3)
|
217
|
+
treetop (1.4.10)
|
218
|
+
polyglot
|
219
|
+
polyglot (>= 0.3.1)
|
220
|
+
tzinfo (0.3.33)
|
221
|
+
uuidtools (2.1.3)
|
222
|
+
warden (1.1.1)
|
223
|
+
rack (>= 1.0)
|
224
|
+
xpath (0.1.4)
|
225
|
+
nokogiri (~> 1.3)
|
226
|
+
|
227
|
+
PLATFORMS
|
228
|
+
ruby
|
229
|
+
|
230
|
+
DEPENDENCIES
|
231
|
+
capybara (= 1.0.1)
|
232
|
+
debugger
|
233
|
+
factory_girl (~> 2.6.4)
|
234
|
+
ffaker
|
235
|
+
rspec-rails (~> 2.9)
|
236
|
+
spree_api_auth!
|
237
|
+
sqlite3
|
data/LICENSE
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
Copyright (c) 2012 [name of plugin creator]
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without modification,
|
5
|
+
are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
* Redistributions of source code must retain the above copyright notice,
|
8
|
+
this list of conditions and the following disclaimer.
|
9
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
10
|
+
this list of conditions and the following disclaimer in the documentation
|
11
|
+
and/or other materials provided with the distribution.
|
12
|
+
* Neither the name Spree nor the names of its contributors may be used to
|
13
|
+
endorse or promote products derived from this software without specific
|
14
|
+
prior written permission.
|
15
|
+
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
20
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
21
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
22
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
23
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
24
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
25
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
26
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
SpreeApiAuth
|
2
|
+
============
|
3
|
+
|
4
|
+
Introduction goes here.
|
5
|
+
|
6
|
+
|
7
|
+
Example
|
8
|
+
=======
|
9
|
+
|
10
|
+
Example goes here.
|
11
|
+
|
12
|
+
Testing
|
13
|
+
-------
|
14
|
+
|
15
|
+
Be sure to bundle your dependencies and then create a dummy test app for the specs to run against.
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
$ bundle exec rake test_app
|
19
|
+
$ bundle exec rspec spec
|
20
|
+
|
21
|
+
Copyright (c) 2012 [name of extension creator], released under the New BSD License
|
data/Rakefile
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/testtask'
|
3
|
+
require 'rake/packagetask'
|
4
|
+
require 'rubygems/package_task'
|
5
|
+
require 'rspec/core/rake_task'
|
6
|
+
require 'spree/core/testing_support/common_rake'
|
7
|
+
|
8
|
+
RSpec::Core::RakeTask.new
|
9
|
+
|
10
|
+
task :default => [:spec]
|
11
|
+
|
12
|
+
spec = eval(File.read('spree_api_auth.gemspec'))
|
13
|
+
|
14
|
+
Gem::PackageTask.new(spec) do |p|
|
15
|
+
p.gem_spec = spec
|
16
|
+
end
|
17
|
+
|
18
|
+
desc 'Release to gemcutter'
|
19
|
+
task :release => :package do
|
20
|
+
require 'rake/gemcutter'
|
21
|
+
Rake::Gemcutter::Tasks.new(spec).define
|
22
|
+
Rake::Task['gem:push'].invoke
|
23
|
+
end
|
24
|
+
|
25
|
+
desc 'Generates a dummy app for testing'
|
26
|
+
task :test_app do
|
27
|
+
ENV['LIB_NAME'] = 'spree_api_auth'
|
28
|
+
Rake::Task['common:test_app'].invoke
|
29
|
+
end
|
data/Versionfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# This file is used to designate compatibilty with different versions of Spree
|
2
|
+
# Please see http://spreecommerce.com/documentation/extensions.html#versionfile for details
|
3
|
+
|
4
|
+
# Examples
|
5
|
+
#
|
6
|
+
# '1.2.x' => { :branch => 'master' }
|
7
|
+
# '1.1.x' => { :branch => '1-1-stable' }
|
8
|
+
# '1.0.x' => { :branch => '1-0-stable' }
|
9
|
+
# '0.70.x' => { :branch => '0-70-stable' }
|
10
|
+
# '0.40.x' => { :tag => 'v1.0.0', :version => '1.0.0' }
|
11
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Spree
|
2
|
+
module Api
|
3
|
+
module V1
|
4
|
+
class UsersController < Spree::Api::V1::BaseController
|
5
|
+
before_filter :check_for_api_key, :except => [:sign_up, :sign_in]
|
6
|
+
|
7
|
+
def sign_up
|
8
|
+
@user = Spree::User.new(params[:user])
|
9
|
+
if !@user.save
|
10
|
+
unauthorized
|
11
|
+
return
|
12
|
+
end
|
13
|
+
@user.generate_api_key!
|
14
|
+
end
|
15
|
+
|
16
|
+
def sign_in
|
17
|
+
@user = Spree::User.find_by_email(params[:user][:email])
|
18
|
+
if !@user.present? || !@user.valid_password?(params[:user][:password])
|
19
|
+
unauthorized
|
20
|
+
return
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/config/routes.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
module SpreeApiAuth
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < Rails::Generators::Base
|
4
|
+
|
5
|
+
def add_javascripts
|
6
|
+
append_file 'app/assets/javascripts/store/all.js', "//= require store/spree_api_auth\n"
|
7
|
+
append_file 'app/assets/javascripts/admin/all.js', "//= require admin/spree_api_auth\n"
|
8
|
+
end
|
9
|
+
|
10
|
+
def add_stylesheets
|
11
|
+
inject_into_file 'app/assets/stylesheets/store/all.css', " *= require store/spree_api_auth\n", :before => /\*\//, :verbose => true
|
12
|
+
inject_into_file 'app/assets/stylesheets/admin/all.css', " *= require admin/spree_api_auth\n", :before => /\*\//, :verbose => true
|
13
|
+
end
|
14
|
+
|
15
|
+
def add_migrations
|
16
|
+
run 'bundle exec rake railties:install:migrations FROM=spree_api_auth'
|
17
|
+
end
|
18
|
+
|
19
|
+
def run_migrations
|
20
|
+
res = ask 'Would you like to run the migrations now? [Y/n]'
|
21
|
+
if res == '' || res.downcase == 'y'
|
22
|
+
run 'bundle exec rake db:migrate'
|
23
|
+
else
|
24
|
+
puts 'Skipping rake db:migrate, don\'t forget to run it!'
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Spree
|
2
|
+
module Api
|
3
|
+
module ControllerSetup
|
4
|
+
def self.included(klass)
|
5
|
+
klass.class_eval do
|
6
|
+
include AbstractController::Rendering
|
7
|
+
include AbstractController::ViewPaths
|
8
|
+
include AbstractController::Callbacks
|
9
|
+
include AbstractController::Helpers
|
10
|
+
|
11
|
+
include ActiveSupport::Rescuable
|
12
|
+
|
13
|
+
include ActionController::Rendering
|
14
|
+
include ActionController::ImplicitRender
|
15
|
+
include ActionController::Rescue
|
16
|
+
include ActionController::MimeResponds
|
17
|
+
|
18
|
+
include CanCan::ControllerAdditions
|
19
|
+
prepend_view_path Rails.root + "app/views"
|
20
|
+
append_view_path File.expand_path("../../../app/views", File.dirname(__FILE__))
|
21
|
+
|
22
|
+
respond_to :json
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module SpreeApiAuth
|
2
|
+
class Engine < Rails::Engine
|
3
|
+
require 'spree/core'
|
4
|
+
isolate_namespace Spree
|
5
|
+
engine_name 'spree_api_auth'
|
6
|
+
|
7
|
+
config.autoload_paths += %W(#{config.root}/lib)
|
8
|
+
|
9
|
+
# use rspec for tests
|
10
|
+
config.generators do |g|
|
11
|
+
g.test_framework :rspec
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.activate
|
15
|
+
Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')) do |c|
|
16
|
+
Rails.configuration.cache_classes ? require(c) : load(c)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
config.to_prepare &method(:activate).to_proc
|
21
|
+
end
|
22
|
+
end
|
data/script/rails
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
2
|
+
|
3
|
+
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
4
|
+
ENGINE_PATH = File.expand_path('../../lib/spree_api_auth/engine', __FILE__)
|
5
|
+
|
6
|
+
require 'rails/all'
|
7
|
+
require 'rails/engine/commands'
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV['RAILS_ENV'] = 'test'
|
3
|
+
|
4
|
+
require File.expand_path('../dummy/config/environment.rb', __FILE__)
|
5
|
+
|
6
|
+
require 'rspec/rails'
|
7
|
+
require 'ffaker'
|
8
|
+
|
9
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
10
|
+
# in spec/support/ and its subdirectories.
|
11
|
+
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }
|
12
|
+
|
13
|
+
# Requires factories defined in spree_core
|
14
|
+
require 'spree/core/testing_support/factories'
|
15
|
+
require 'spree/core/url_helpers'
|
16
|
+
|
17
|
+
RSpec.configure do |config|
|
18
|
+
config.include FactoryGirl::Syntax::Methods
|
19
|
+
|
20
|
+
# == URL Helpers
|
21
|
+
#
|
22
|
+
# Allows access to Spree's routes in specs:
|
23
|
+
#
|
24
|
+
# visit spree.admin_path
|
25
|
+
# current_path.should eql(spree.products_path)
|
26
|
+
config.include Spree::Core::UrlHelpers
|
27
|
+
|
28
|
+
# == Mock Framework
|
29
|
+
#
|
30
|
+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
31
|
+
#
|
32
|
+
# config.mock_with :mocha
|
33
|
+
# config.mock_with :flexmock
|
34
|
+
# config.mock_with :rr
|
35
|
+
config.mock_with :rspec
|
36
|
+
|
37
|
+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
38
|
+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
39
|
+
|
40
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
41
|
+
# examples within a transaction, remove the following line or assign false
|
42
|
+
# instead of true.
|
43
|
+
config.use_transactional_fixtures = true
|
44
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
Gem::Specification.new do |s|
|
3
|
+
s.platform = Gem::Platform::RUBY
|
4
|
+
s.name = 'spree_api_auth'
|
5
|
+
s.version = '0.0.2'
|
6
|
+
s.summary = "Spree's Authenticattion API"
|
7
|
+
s.description = "Spree's Authenticattion API"
|
8
|
+
s.required_ruby_version = '>= 1.8.7'
|
9
|
+
|
10
|
+
s.author = 'Masahiro Saito'
|
11
|
+
s.email = 'camelmasa@gmail.com'
|
12
|
+
s.homepage = "https://github.com/camelmasa/#{s.name}"
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
#s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
s.require_path = 'lib'
|
17
|
+
s.requirements << 'none'
|
18
|
+
|
19
|
+
s.add_dependency 'spree_core', '~> 1.1.3'
|
20
|
+
s.add_dependency 'spree_api', '~> 1.1.3'
|
21
|
+
s.add_dependency 'spree_auth', '~> 1.1.3'
|
22
|
+
|
23
|
+
s.add_development_dependency 'capybara', '1.0.1'
|
24
|
+
s.add_development_dependency 'factory_girl', '~> 2.6.4'
|
25
|
+
s.add_development_dependency 'ffaker'
|
26
|
+
s.add_development_dependency 'rspec-rails', '~> 2.9'
|
27
|
+
s.add_development_dependency 'sqlite3'
|
28
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_api_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -144,7 +144,27 @@ email: camelmasa@gmail.com
|
|
144
144
|
executables: []
|
145
145
|
extensions: []
|
146
146
|
extra_rdoc_files: []
|
147
|
-
files:
|
147
|
+
files:
|
148
|
+
- .gitignore
|
149
|
+
- .rspec
|
150
|
+
- Gemfile
|
151
|
+
- Gemfile.lock
|
152
|
+
- LICENSE
|
153
|
+
- README.md
|
154
|
+
- Rakefile
|
155
|
+
- Versionfile
|
156
|
+
- app/controllers/spree/api/v1/users_controller.rb
|
157
|
+
- app/views/spree/api/v1/users/sign_in.rabl
|
158
|
+
- app/views/spree/api/v1/users/sign_up.rabl
|
159
|
+
- config/locales/en.yml
|
160
|
+
- config/routes.rb
|
161
|
+
- lib/generators/spree_api_auth/install/install_generator.rb
|
162
|
+
- lib/spree_api_auth.rb
|
163
|
+
- lib/spree_api_auth/controller_setup.rb
|
164
|
+
- lib/spree_api_auth/engine.rb
|
165
|
+
- script/rails
|
166
|
+
- spec/spec_helper.rb
|
167
|
+
- spree_api_auth.gemspec
|
148
168
|
homepage: https://github.com/camelmasa/spree_api_auth
|
149
169
|
licenses: []
|
150
170
|
post_install_message:
|
@@ -165,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
185
|
version: '0'
|
166
186
|
segments:
|
167
187
|
- 0
|
168
|
-
hash: -
|
188
|
+
hash: -2152916452581001754
|
169
189
|
requirements:
|
170
190
|
- none
|
171
191
|
rubyforge_project:
|