horse_power 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generators/horse_power/setup/setup_generator.rb +3 -1
- data/lib/generators/horse_power/setup/templates/app_index_controller_spec.rb +12 -0
- data/lib/generators/horse_power/tests/templates/request.rb.erb +6 -6
- data/lib/generators/horse_power/user/templates/specs/factory.rb.erb +6 -3
- data/lib/generators/horse_power/user/templates/specs/requests.rb.erb +14 -14
- data/lib/horse_power/version.rb +1 -1
- data/test/fresh/testNewerRails/Gemfile +46 -0
- data/test/fresh/testNewerRails/Gemfile.lock +160 -0
- data/test/fresh/testNewerRails/README.rdoc +28 -0
- data/test/fresh/testNewerRails/Rakefile +6 -0
- data/test/fresh/testNewerRails/app/assets/javascripts/application.js +16 -0
- data/test/fresh/testNewerRails/app/assets/stylesheets/application.css +15 -0
- data/test/fresh/testNewerRails/app/controllers/application_controller.rb +5 -0
- data/test/fresh/testNewerRails/app/helpers/application_helper.rb +2 -0
- data/test/fresh/testNewerRails/app/views/layouts/application.html.erb +14 -0
- data/test/fresh/testNewerRails/bin/bundle +3 -0
- data/test/fresh/testNewerRails/bin/rails +8 -0
- data/test/fresh/testNewerRails/bin/rake +8 -0
- data/test/fresh/testNewerRails/bin/setup +29 -0
- data/test/fresh/testNewerRails/bin/spring +15 -0
- data/test/fresh/testNewerRails/config/application.rb +26 -0
- data/test/fresh/testNewerRails/config/boot.rb +3 -0
- data/test/fresh/testNewerRails/config/database.yml +25 -0
- data/test/fresh/testNewerRails/config/environment.rb +5 -0
- data/test/fresh/testNewerRails/config/environments/development.rb +41 -0
- data/test/fresh/testNewerRails/config/environments/production.rb +79 -0
- data/test/fresh/testNewerRails/config/environments/test.rb +42 -0
- data/test/fresh/testNewerRails/config/initializers/assets.rb +11 -0
- data/test/fresh/testNewerRails/config/initializers/backtrace_silencers.rb +7 -0
- data/test/fresh/testNewerRails/config/initializers/cookies_serializer.rb +3 -0
- data/test/fresh/testNewerRails/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/fresh/testNewerRails/config/initializers/inflections.rb +16 -0
- data/test/fresh/testNewerRails/config/initializers/mime_types.rb +4 -0
- data/test/fresh/testNewerRails/config/initializers/session_store.rb +3 -0
- data/test/fresh/testNewerRails/config/initializers/wrap_parameters.rb +14 -0
- data/test/fresh/testNewerRails/config/locales/en.yml +23 -0
- data/test/fresh/testNewerRails/config/routes.rb +56 -0
- data/test/fresh/testNewerRails/config/secrets.yml +22 -0
- data/test/fresh/testNewerRails/config.ru +4 -0
- data/test/fresh/testNewerRails/db/seeds.rb +7 -0
- data/test/fresh/testNewerRails/public/404.html +67 -0
- data/test/fresh/testNewerRails/public/422.html +67 -0
- data/test/fresh/testNewerRails/public/500.html +66 -0
- data/test/fresh/testNewerRails/public/favicon.ico +0 -0
- data/test/fresh/testNewerRails/public/robots.txt +5 -0
- data/test/fresh/testNewerRails/test/test_helper.rb +10 -0
- metadata +82 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b72736abd78cb7ff9706a8f549283f235eee80e
|
4
|
+
data.tar.gz: 65eee83cc5fda53765b3d17bbe4a83c66ae8dcfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32b829f3f15785646553fba5af81a24a8fc1bd519da3b181b647dd9132b506622d1502b1a0bc23d0a4aea3615b91e86b07a92032350550b6019bd021bb77e905
|
7
|
+
data.tar.gz: 547d006fa5d19159c446c335448fe5faeff4ebdda158bfb165274436d6b2c788cdad594999206f3fc6340bb3f6432056e59f41f096dc2434e8021391ecfb6ed8
|
@@ -94,6 +94,8 @@ module HorsePower
|
|
94
94
|
|
95
95
|
def make_controllers
|
96
96
|
generate "controller", "app_index app"
|
97
|
+
run "rm -f spec/controllers/app_index_controller_spec.rb"
|
98
|
+
copy_file "app_index_controller_spec.rb", "spec/controllers/app_index_controller_spec.rb"
|
97
99
|
run "rm -f app/controllers/app_index_controller.rb"
|
98
100
|
copy_file "app_index_controller.rb", "app/controllers/app_index_controller.rb"
|
99
101
|
#Copy the views over
|
@@ -126,7 +128,7 @@ module HorsePower
|
|
126
128
|
gem 'figaro', '~> 0.7.0' # env variables
|
127
129
|
gem 'annotate', ">=2.6.0"
|
128
130
|
gem 'rspec-rails', '~> 3.0.0'
|
129
|
-
gem 'byebug', '~> 3.2.0'
|
131
|
+
#gem 'byebug', '~> 3.2.0'
|
130
132
|
gem 'factory_girl_rails', '~> 4.0'
|
131
133
|
gem 'database_cleaner', '~> 1.3.0'
|
132
134
|
end
|
@@ -11,7 +11,7 @@ RSpec.describe <%= HorsePower.get_camel(resource_name) %>, :type => :request do
|
|
11
11
|
# get /api/<%= api_version %>/<%= HorsePower.get_plural(resource_name) %>
|
12
12
|
it "Gets all of the <%= HorsePower.get_singular(resource_name) %>s" do
|
13
13
|
FactoryGirl.create_list(:<%= HorsePower.get_singular(resource_name) %>_<%= api_version %>, 10)
|
14
|
-
get 'api/<%= api_version %>/<%= HorsePower.get_plural(resource_name) %>', nil, @header
|
14
|
+
get '/api/<%= api_version %>/<%= HorsePower.get_plural(resource_name) %>', nil, @header
|
15
15
|
expect(response.status).to eq(200) #ok
|
16
16
|
expect(<%= HorsePower.get_camel(resource_name) %>.count).to eq(10)
|
17
17
|
expect(json["<%= HorsePower.get_plural(resource_name) %>"].length).to eq(10)
|
@@ -28,7 +28,7 @@ RSpec.describe <%= HorsePower.get_camel(resource_name) %>, :type => :request do
|
|
28
28
|
# get /api/<%= api_version %>/<%= HorsePower.get_plural(resource_name) %>/1
|
29
29
|
it "Gets a <%= HorsePower.get_singular(resource_name) %> by id" do
|
30
30
|
<%= HorsePower.get_singular(resource_name) %> = FactoryGirl.create(:<%= HorsePower.get_singular(resource_name) %>_<%= api_version %>)
|
31
|
-
get "api/<%= api_version %>/<%= HorsePower.get_plural(resource_name) %>/#{<%= HorsePower.get_singular(resource_name) %>.id}", nil, @header
|
31
|
+
get "/api/<%= api_version %>/<%= HorsePower.get_plural(resource_name) %>/#{<%= HorsePower.get_singular(resource_name) %>.id}", nil, @header
|
32
32
|
expect(response.status).to eq(200) #ok
|
33
33
|
end
|
34
34
|
end
|
@@ -45,7 +45,7 @@ RSpec.describe <%= HorsePower.get_camel(resource_name) %>, :type => :request do
|
|
45
45
|
attrs = FactoryGirl.attributes_for(:<%= HorsePower.get_singular(resource_name) %>_<%= api_version %>)
|
46
46
|
#attrs[:column] = "DefaultString"
|
47
47
|
hash = {"<%= HorsePower.get_singular(resource_name) %>" => attrs}
|
48
|
-
post 'api/<%= api_version %>/<%= HorsePower.get_plural(resource_name) %>', hash, @header
|
48
|
+
post '/api/<%= api_version %>/<%= HorsePower.get_plural(resource_name) %>', hash, @header
|
49
49
|
expect(response.status).to eq(200) #ok
|
50
50
|
end
|
51
51
|
end
|
@@ -64,7 +64,7 @@ RSpec.describe <%= HorsePower.get_camel(resource_name) %>, :type => :request do
|
|
64
64
|
#attrs[:column] = "DefaultString"
|
65
65
|
<%= HorsePower.get_singular(resource_name) %> = FactoryGirl.create(:<%= HorsePower.get_singular(resource_name) %>_<%= api_version %>)
|
66
66
|
hash = {"<%= HorsePower.get_singular(resource_name) %>" => attrs}
|
67
|
-
put "api/<%= api_version %>/<%= HorsePower.get_plural(resource_name) %>/#{<%= HorsePower.get_singular(resource_name) %>.id}", hash, @header
|
67
|
+
put "/api/<%= api_version %>/<%= HorsePower.get_plural(resource_name) %>/#{<%= HorsePower.get_singular(resource_name) %>.id}", hash, @header
|
68
68
|
expect(response.status).to eq(200) #ok
|
69
69
|
end
|
70
70
|
end
|
@@ -84,7 +84,7 @@ RSpec.describe <%= HorsePower.get_camel(resource_name) %>, :type => :request do
|
|
84
84
|
<%= HorsePower.get_singular(resource_name) %> = FactoryGirl.create(:<%= HorsePower.get_singular(resource_name) %>_<%= api_version %>)
|
85
85
|
expect(<%= HorsePower.get_camel(resource_name) %>.count).to eq(1)
|
86
86
|
#Now delete the <%= HorsePower.get_singular(resource_name) %> through the api
|
87
|
-
delete "api/<%= api_version %>/<%= HorsePower.get_plural(resource_name) %>/#{<%= HorsePower.get_singular(resource_name) %>.id}", nil, @header
|
87
|
+
delete "/api/<%= api_version %>/<%= HorsePower.get_plural(resource_name) %>/#{<%= HorsePower.get_singular(resource_name) %>.id}", nil, @header
|
88
88
|
expect(json).to eq({})
|
89
89
|
expect(response.status).to eq(200) #ok
|
90
90
|
expect(<%= HorsePower.get_camel(resource_name) %>.count).to eq(0)
|
@@ -129,7 +129,7 @@ RSpec.describe <%= HorsePower.get_camel(resource_name) %>, :type => :request do
|
|
129
129
|
# get /api/<%= api_version %>/<%= HorsePower.get_plural(resource_name) %>/1
|
130
130
|
it "checks for a 404" do
|
131
131
|
<%= HorsePower.get_singular(resource_name) %> = FactoryGirl.create(:<%= HorsePower.get_singular(resource_name) %>_<%= api_version %>)
|
132
|
-
get "api/<%= api_version %>/<%= HorsePower.get_plural(resource_name) %>/#{<%= HorsePower.get_singular(resource_name) %>.id + 1}", nil, @header
|
132
|
+
get "/api/<%= api_version %>/<%= HorsePower.get_plural(resource_name) %>/#{<%= HorsePower.get_singular(resource_name) %>.id + 1}", nil, @header
|
133
133
|
expect(response.status).to eq(404) #ok
|
134
134
|
end
|
135
135
|
end
|
@@ -5,10 +5,13 @@ FactoryGirl.define do
|
|
5
5
|
sequence :email do |n|
|
6
6
|
"username#{n}@email.com"
|
7
7
|
end
|
8
|
+
sequence :fb_user_id do |n|
|
9
|
+
n
|
10
|
+
end
|
8
11
|
factory :user_1, class: User do
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
+
username
|
13
|
+
email
|
14
|
+
fb_user_id
|
12
15
|
password "password123"
|
13
16
|
password_confirmation "password123"
|
14
17
|
end
|
@@ -11,7 +11,7 @@ RSpec.describe User, :type => :request do
|
|
11
11
|
# get /api/1/users
|
12
12
|
it "checks index json response" do
|
13
13
|
FactoryGirl.create_list(:user_1, 10)
|
14
|
-
get 'api/1/users', nil, @header
|
14
|
+
get '/api/1/users', nil, @header
|
15
15
|
expect(response.status).to eq(200) #ok
|
16
16
|
expect(json["users"]).to_not eq(nil)
|
17
17
|
end
|
@@ -26,7 +26,7 @@ RSpec.describe User, :type => :request do
|
|
26
26
|
end
|
27
27
|
# get /api/1/users/1
|
28
28
|
it "checks show json response" do
|
29
|
-
get "api/1/users/#{@user.id}", nil, @header
|
29
|
+
get "/api/1/users/#{@user.id}", nil, @header
|
30
30
|
expect(response.status).to eq(200) #ok
|
31
31
|
expect(json["user"]["id"]).to eq(1)
|
32
32
|
end
|
@@ -47,7 +47,7 @@ RSpec.describe User, :type => :request do
|
|
47
47
|
@attrs["email"] = "cole@email.com"
|
48
48
|
hash = {"user" => @attrs}
|
49
49
|
#This uses users 1 header
|
50
|
-
put "api/1/users/#{@user.id}", hash, @header
|
50
|
+
put "/api/1/users/#{@user.id}", hash, @header
|
51
51
|
expect(response.status).to eq(200) #ok
|
52
52
|
expect(json["user"]["email"]).to eq("cole@email.com")
|
53
53
|
end
|
@@ -56,14 +56,14 @@ RSpec.describe User, :type => :request do
|
|
56
56
|
@attrs["email"] = "cole@email.com"
|
57
57
|
hash = {"user" => @attrs}
|
58
58
|
#This uses users 1 header and user 2 id
|
59
|
-
put "api/1/users/#{@user.id + 1}", hash, @header
|
59
|
+
put "/api/1/users/#{@user.id + 1}", hash, @header
|
60
60
|
expect(response.status).to eq(403) #forbidden
|
61
61
|
end
|
62
62
|
it "makes sure a user can't update to bad values" do
|
63
63
|
@attrs["email"] = ""
|
64
64
|
hash = {"user" => @attrs}
|
65
65
|
#This uses users 1 header
|
66
|
-
put "api/1/users/#{@user.id}", hash, @header
|
66
|
+
put "/api/1/users/#{@user.id}", hash, @header
|
67
67
|
expect(response.status).to eq(422) #ok
|
68
68
|
end
|
69
69
|
end
|
@@ -82,7 +82,7 @@ RSpec.describe User, :type => :request do
|
|
82
82
|
it "makes sure a user can delete their accout" do
|
83
83
|
hash = {"user" => @attrs}
|
84
84
|
#This uses users 1 header
|
85
|
-
delete "api/1/users/#{@user.id}", hash, @header
|
85
|
+
delete "/api/1/users/#{@user.id}", hash, @header
|
86
86
|
expect(response.status).to eq(200) #ok
|
87
87
|
expect(User.count).to eq(0)
|
88
88
|
end
|
@@ -91,7 +91,7 @@ RSpec.describe User, :type => :request do
|
|
91
91
|
hash = {"user" => @attrs}
|
92
92
|
#This uses users 1 header
|
93
93
|
user2 = FactoryGirl.create(:user_1)
|
94
|
-
delete "api/1/users/#{user2.id}", hash, @header
|
94
|
+
delete "/api/1/users/#{user2.id}", hash, @header
|
95
95
|
expect(response.status).to eq(403) #ok
|
96
96
|
expect(User.count).to eq(2)
|
97
97
|
end
|
@@ -108,7 +108,7 @@ RSpec.describe User, :type => :request do
|
|
108
108
|
# get /api/1/users
|
109
109
|
it "checks only appropriate attributes are sent back for index" do
|
110
110
|
FactoryGirl.create_list(:user_1, 10)
|
111
|
-
get 'api/1/users', nil, @header
|
111
|
+
get '/api/1/users', nil, @header
|
112
112
|
expect(response.status).to eq(200) #ok
|
113
113
|
expect(User.count).to eq(11)
|
114
114
|
expect(::Arcadex::Token.count).to eq(11)
|
@@ -127,7 +127,7 @@ RSpec.describe User, :type => :request do
|
|
127
127
|
@header = {::Settings.token_header => token, "Email" => @user.email, ::Settings.main_api_header => ::Settings.main_api_key}
|
128
128
|
end
|
129
129
|
it "checks for 404 response" do
|
130
|
-
get "api/1/users/#{@user.id + 10}", nil, @header
|
130
|
+
get "/api/1/users/#{@user.id + 10}", nil, @header
|
131
131
|
expect(response.status).to eq(404) #not_found
|
132
132
|
end
|
133
133
|
end
|
@@ -143,7 +143,7 @@ RSpec.describe User, :type => :request do
|
|
143
143
|
# post /api/1/users/register
|
144
144
|
it "checks response of a register request with a valid user object" do
|
145
145
|
hash = {"user" => @attrs}
|
146
|
-
post 'api/1/users/register', hash, @header
|
146
|
+
post '/api/1/users/register', hash, @header
|
147
147
|
expect(response.status).to eq(200) #ok
|
148
148
|
expect(User.all.count).to eq(1)
|
149
149
|
#A valid token needs to be returned
|
@@ -156,7 +156,7 @@ RSpec.describe User, :type => :request do
|
|
156
156
|
@attrs["password"] = "password1"
|
157
157
|
@attrs["password_confirmation"] = "password2"
|
158
158
|
hash = {"user" => @attrs}
|
159
|
-
post 'api/1/users/register', hash, @header
|
159
|
+
post '/api/1/users/register', hash, @header
|
160
160
|
expect(response.status).to eq(422) #invalid_resource
|
161
161
|
expect(User.all.count).to eq(0)
|
162
162
|
#Errors need to be returned
|
@@ -177,7 +177,7 @@ RSpec.describe User, :type => :request do
|
|
177
177
|
user = FactoryGirl.create(:user_1,@attrs)
|
178
178
|
old_auth_token = user.tokens[0].auth_token
|
179
179
|
hash = {"user" => @attrs}
|
180
|
-
post 'api/1/users/login', hash, @header
|
180
|
+
post '/api/1/users/login', hash, @header
|
181
181
|
expect(response.status).to eq(200) #ok
|
182
182
|
#A valid and new token need to be returned
|
183
183
|
expect(json["token"]["auth_token"]).to_not eq(old_auth_token)
|
@@ -194,7 +194,7 @@ RSpec.describe User, :type => :request do
|
|
194
194
|
@attrs["password"] = "wrongPassword"
|
195
195
|
hash = {"user" => @attrs}
|
196
196
|
#It needs to send an email and password
|
197
|
-
post 'api/1/users/login', hash, @header
|
197
|
+
post '/api/1/users/login', hash, @header
|
198
198
|
expect(response.status).to eq(401) #unauthorized
|
199
199
|
#Errors need to be returned
|
200
200
|
expect(json["errors"]).to_not eq(nil)
|
@@ -215,7 +215,7 @@ RSpec.describe User, :type => :request do
|
|
215
215
|
user = FactoryGirl.create(:user_1,@attrs)
|
216
216
|
token = user.tokens[0].auth_token
|
217
217
|
header = {::Settings.token_header => token, "Email" => user.email, ::Settings.main_api_header => ::Settings.main_api_key}
|
218
|
-
post 'api/1/users/logout', nil, header
|
218
|
+
post '/api/1/users/logout', nil, header
|
219
219
|
expect(User.count).to eq(1)
|
220
220
|
expect(response.status).to eq(200) #ok
|
221
221
|
expect(::Arcadex::Token.count).to eq(0)
|
data/lib/horse_power/version.rb
CHANGED
@@ -0,0 +1,46 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
|
4
|
+
gem 'horse_power', :path => "../../../"
|
5
|
+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
6
|
+
gem 'rails', '4.2.1'
|
7
|
+
# Use sqlite3 as the database for Active Record
|
8
|
+
gem 'sqlite3'
|
9
|
+
# Use SCSS for stylesheets
|
10
|
+
gem 'sass-rails', '~> 5.0'
|
11
|
+
# Use Uglifier as compressor for JavaScript assets
|
12
|
+
gem 'uglifier', '>= 1.3.0'
|
13
|
+
# Use CoffeeScript for .coffee assets and views
|
14
|
+
gem 'coffee-rails', '~> 4.1.0'
|
15
|
+
# See https://github.com/rails/execjs#readme for more supported runtimes
|
16
|
+
# gem 'therubyracer', platforms: :ruby
|
17
|
+
|
18
|
+
# Use jquery as the JavaScript library
|
19
|
+
gem 'jquery-rails'
|
20
|
+
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
21
|
+
gem 'turbolinks'
|
22
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
23
|
+
gem 'jbuilder', '~> 2.0'
|
24
|
+
# bundle exec rake doc:rails generates the API under doc/api.
|
25
|
+
gem 'sdoc', '~> 0.4.0', group: :doc
|
26
|
+
|
27
|
+
# Use ActiveModel has_secure_password
|
28
|
+
# gem 'bcrypt', '~> 3.1.7'
|
29
|
+
|
30
|
+
# Use Unicorn as the app server
|
31
|
+
# gem 'unicorn'
|
32
|
+
|
33
|
+
# Use Capistrano for deployment
|
34
|
+
# gem 'capistrano-rails', group: :development
|
35
|
+
|
36
|
+
group :development, :test do
|
37
|
+
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
38
|
+
gem 'byebug'
|
39
|
+
|
40
|
+
# Access an IRB console on exception pages or by using <%= console %> in views
|
41
|
+
gem 'web-console', '~> 2.0'
|
42
|
+
|
43
|
+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
44
|
+
gem 'spring'
|
45
|
+
end
|
46
|
+
|
@@ -0,0 +1,160 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
actionmailer (4.2.1)
|
5
|
+
actionpack (= 4.2.1)
|
6
|
+
actionview (= 4.2.1)
|
7
|
+
activejob (= 4.2.1)
|
8
|
+
mail (~> 2.5, >= 2.5.4)
|
9
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
10
|
+
actionpack (4.2.1)
|
11
|
+
actionview (= 4.2.1)
|
12
|
+
activesupport (= 4.2.1)
|
13
|
+
rack (~> 1.6)
|
14
|
+
rack-test (~> 0.6.2)
|
15
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
16
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
17
|
+
actionview (4.2.1)
|
18
|
+
activesupport (= 4.2.1)
|
19
|
+
builder (~> 3.1)
|
20
|
+
erubis (~> 2.7.0)
|
21
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
22
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
23
|
+
activejob (4.2.1)
|
24
|
+
activesupport (= 4.2.1)
|
25
|
+
globalid (>= 0.3.0)
|
26
|
+
activemodel (4.2.1)
|
27
|
+
activesupport (= 4.2.1)
|
28
|
+
builder (~> 3.1)
|
29
|
+
activerecord (4.2.1)
|
30
|
+
activemodel (= 4.2.1)
|
31
|
+
activesupport (= 4.2.1)
|
32
|
+
arel (~> 6.0)
|
33
|
+
activesupport (4.2.1)
|
34
|
+
i18n (~> 0.7)
|
35
|
+
json (~> 1.7, >= 1.7.7)
|
36
|
+
minitest (~> 5.1)
|
37
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
38
|
+
tzinfo (~> 1.1)
|
39
|
+
arel (6.0.0)
|
40
|
+
binding_of_caller (0.7.2)
|
41
|
+
debug_inspector (>= 0.0.1)
|
42
|
+
builder (3.2.2)
|
43
|
+
byebug (4.0.3)
|
44
|
+
columnize (= 0.9.0)
|
45
|
+
coffee-rails (4.1.0)
|
46
|
+
coffee-script (>= 2.2.0)
|
47
|
+
railties (>= 4.0.0, < 5.0)
|
48
|
+
coffee-script (2.3.0)
|
49
|
+
coffee-script-source
|
50
|
+
execjs
|
51
|
+
coffee-script-source (1.9.1)
|
52
|
+
columnize (0.9.0)
|
53
|
+
debug_inspector (0.0.2)
|
54
|
+
erubis (2.7.0)
|
55
|
+
execjs (2.4.0)
|
56
|
+
globalid (0.3.3)
|
57
|
+
activesupport (>= 4.1.0)
|
58
|
+
hike (1.2.3)
|
59
|
+
i18n (0.7.0)
|
60
|
+
jbuilder (2.2.12)
|
61
|
+
activesupport (>= 3.0.0, < 5)
|
62
|
+
multi_json (~> 1.2)
|
63
|
+
jquery-rails (4.0.3)
|
64
|
+
rails-dom-testing (~> 1.0)
|
65
|
+
railties (>= 4.2.0)
|
66
|
+
thor (>= 0.14, < 2.0)
|
67
|
+
json (1.8.2)
|
68
|
+
loofah (2.0.1)
|
69
|
+
nokogiri (>= 1.5.9)
|
70
|
+
mail (2.6.3)
|
71
|
+
mime-types (>= 1.16, < 3)
|
72
|
+
mime-types (2.4.3)
|
73
|
+
mini_portile (0.6.2)
|
74
|
+
minitest (5.5.1)
|
75
|
+
multi_json (1.11.0)
|
76
|
+
nokogiri (1.6.6.2)
|
77
|
+
mini_portile (~> 0.6.0)
|
78
|
+
rack (1.6.0)
|
79
|
+
rack-test (0.6.3)
|
80
|
+
rack (>= 1.0)
|
81
|
+
rails (4.2.1)
|
82
|
+
actionmailer (= 4.2.1)
|
83
|
+
actionpack (= 4.2.1)
|
84
|
+
actionview (= 4.2.1)
|
85
|
+
activejob (= 4.2.1)
|
86
|
+
activemodel (= 4.2.1)
|
87
|
+
activerecord (= 4.2.1)
|
88
|
+
activesupport (= 4.2.1)
|
89
|
+
bundler (>= 1.3.0, < 2.0)
|
90
|
+
railties (= 4.2.1)
|
91
|
+
sprockets-rails
|
92
|
+
rails-deprecated_sanitizer (1.0.3)
|
93
|
+
activesupport (>= 4.2.0.alpha)
|
94
|
+
rails-dom-testing (1.0.6)
|
95
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
96
|
+
nokogiri (~> 1.6.0)
|
97
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
98
|
+
rails-html-sanitizer (1.0.2)
|
99
|
+
loofah (~> 2.0)
|
100
|
+
railties (4.2.1)
|
101
|
+
actionpack (= 4.2.1)
|
102
|
+
activesupport (= 4.2.1)
|
103
|
+
rake (>= 0.8.7)
|
104
|
+
thor (>= 0.18.1, < 2.0)
|
105
|
+
rake (10.4.2)
|
106
|
+
rdoc (4.2.0)
|
107
|
+
json (~> 1.4)
|
108
|
+
sass (3.4.13)
|
109
|
+
sass-rails (5.0.1)
|
110
|
+
railties (>= 4.0.0, < 5.0)
|
111
|
+
sass (~> 3.1)
|
112
|
+
sprockets (>= 2.8, < 4.0)
|
113
|
+
sprockets-rails (>= 2.0, < 4.0)
|
114
|
+
tilt (~> 1.1)
|
115
|
+
sdoc (0.4.1)
|
116
|
+
json (~> 1.7, >= 1.7.7)
|
117
|
+
rdoc (~> 4.0)
|
118
|
+
spring (1.3.3)
|
119
|
+
sprockets (2.12.3)
|
120
|
+
hike (~> 1.2)
|
121
|
+
multi_json (~> 1.0)
|
122
|
+
rack (~> 1.0)
|
123
|
+
tilt (~> 1.1, != 1.3.0)
|
124
|
+
sprockets-rails (2.2.4)
|
125
|
+
actionpack (>= 3.0)
|
126
|
+
activesupport (>= 3.0)
|
127
|
+
sprockets (>= 2.8, < 4.0)
|
128
|
+
sqlite3 (1.3.10)
|
129
|
+
thor (0.19.1)
|
130
|
+
thread_safe (0.3.5)
|
131
|
+
tilt (1.4.1)
|
132
|
+
turbolinks (2.5.3)
|
133
|
+
coffee-rails
|
134
|
+
tzinfo (1.2.2)
|
135
|
+
thread_safe (~> 0.1)
|
136
|
+
uglifier (2.7.1)
|
137
|
+
execjs (>= 0.3.0)
|
138
|
+
json (>= 1.8.0)
|
139
|
+
web-console (2.1.2)
|
140
|
+
activemodel (>= 4.0)
|
141
|
+
binding_of_caller (>= 0.7.2)
|
142
|
+
railties (>= 4.0)
|
143
|
+
sprockets-rails (>= 2.0, < 4.0)
|
144
|
+
|
145
|
+
PLATFORMS
|
146
|
+
ruby
|
147
|
+
|
148
|
+
DEPENDENCIES
|
149
|
+
byebug
|
150
|
+
coffee-rails (~> 4.1.0)
|
151
|
+
jbuilder (~> 2.0)
|
152
|
+
jquery-rails
|
153
|
+
rails (= 4.2.1)
|
154
|
+
sass-rails (~> 5.0)
|
155
|
+
sdoc (~> 0.4.0)
|
156
|
+
spring
|
157
|
+
sqlite3
|
158
|
+
turbolinks
|
159
|
+
uglifier (>= 1.3.0)
|
160
|
+
web-console (~> 2.0)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require turbolinks
|
16
|
+
//= require_tree .
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>TestNewerRails</title>
|
5
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
# path to your application root.
|
5
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
|
+
|
7
|
+
Dir.chdir APP_ROOT do
|
8
|
+
# This script is a starting point to setup your application.
|
9
|
+
# Add necessary setup steps to this file:
|
10
|
+
|
11
|
+
puts "== Installing dependencies =="
|
12
|
+
system "gem install bundler --conservative"
|
13
|
+
system "bundle check || bundle install"
|
14
|
+
|
15
|
+
# puts "\n== Copying sample files =="
|
16
|
+
# unless File.exist?("config/database.yml")
|
17
|
+
# system "cp config/database.yml.sample config/database.yml"
|
18
|
+
# end
|
19
|
+
|
20
|
+
puts "\n== Preparing database =="
|
21
|
+
system "bin/rake db:setup"
|
22
|
+
|
23
|
+
puts "\n== Removing old logs and tempfiles =="
|
24
|
+
system "rm -f log/*"
|
25
|
+
system "rm -rf tmp/cache"
|
26
|
+
|
27
|
+
puts "\n== Restarting application server =="
|
28
|
+
system "touch tmp/restart.txt"
|
29
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# This file loads spring without using Bundler, in order to be fast.
|
4
|
+
# It gets overwritten when you run the `spring binstub` command.
|
5
|
+
|
6
|
+
unless defined?(Spring)
|
7
|
+
require "rubygems"
|
8
|
+
require "bundler"
|
9
|
+
|
10
|
+
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
|
11
|
+
Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
|
12
|
+
gem "spring", match[1]
|
13
|
+
require "spring/binstub"
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
# Require the gems listed in Gemfile, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
Bundler.require(*Rails.groups)
|
8
|
+
|
9
|
+
module TestNewerRails
|
10
|
+
class Application < Rails::Application
|
11
|
+
# Settings in config/environments/* take precedence over those specified here.
|
12
|
+
# Application configuration should go into files in config/initializers
|
13
|
+
# -- all .rb files in that directory are automatically loaded.
|
14
|
+
|
15
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
16
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
17
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
18
|
+
|
19
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
20
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
21
|
+
# config.i18n.default_locale = :de
|
22
|
+
|
23
|
+
# Do not swallow errors in after_commit/after_rollback callbacks.
|
24
|
+
config.active_record.raise_in_transactional_callbacks = true
|
25
|
+
end
|
26
|
+
end
|