tests_doc 0.0.3 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -1
- data/CHANGELOG.md +19 -0
- data/lib/tests_doc/version.rb +1 -1
- data/tests_doc.gemspec +2 -2
- metadata +17 -68
- data/examples/rails-4.2.5/.gitignore +0 -21
- data/examples/rails-4.2.5/.rspec +0 -3
- data/examples/rails-4.2.5/Gemfile +0 -35
- data/examples/rails-4.2.5/Gemfile.lock +0 -143
- data/examples/rails-4.2.5/README.md +0 -3
- data/examples/rails-4.2.5/Rakefile +0 -6
- data/examples/rails-4.2.5/app/assets/images/.keep +0 -0
- data/examples/rails-4.2.5/app/controllers/application_controller.rb +0 -2
- data/examples/rails-4.2.5/app/controllers/concerns/.keep +0 -0
- data/examples/rails-4.2.5/app/controllers/posts_controller.rb +0 -61
- data/examples/rails-4.2.5/app/controllers/users_controller.rb +0 -59
- data/examples/rails-4.2.5/app/mailers/.keep +0 -0
- data/examples/rails-4.2.5/app/models/.keep +0 -0
- data/examples/rails-4.2.5/app/models/concerns/.keep +0 -0
- data/examples/rails-4.2.5/app/models/post.rb +0 -3
- data/examples/rails-4.2.5/app/models/user.rb +0 -2
- data/examples/rails-4.2.5/bin/bundle +0 -3
- data/examples/rails-4.2.5/bin/rails +0 -9
- data/examples/rails-4.2.5/bin/rake +0 -9
- data/examples/rails-4.2.5/bin/setup +0 -29
- data/examples/rails-4.2.5/bin/spring +0 -15
- data/examples/rails-4.2.5/config/application.rb +0 -26
- data/examples/rails-4.2.5/config/boot.rb +0 -3
- data/examples/rails-4.2.5/config/database.yml +0 -25
- data/examples/rails-4.2.5/config/environment.rb +0 -5
- data/examples/rails-4.2.5/config/environments/development.rb +0 -41
- data/examples/rails-4.2.5/config/environments/production.rb +0 -79
- data/examples/rails-4.2.5/config/environments/test.rb +0 -42
- data/examples/rails-4.2.5/config/initializers/filter_parameter_logging.rb +0 -4
- data/examples/rails-4.2.5/config/initializers/secret_token.rb +0 -19
- data/examples/rails-4.2.5/config/initializers/wrap_parameters.rb +0 -13
- data/examples/rails-4.2.5/config/locales/en.yml +0 -23
- data/examples/rails-4.2.5/config/routes.rb +0 -60
- data/examples/rails-4.2.5/config/secrets.yml +0 -22
- data/examples/rails-4.2.5/config.ru +0 -4
- data/examples/rails-4.2.5/db/migrate/20151119010359_create_users.rb +0 -11
- data/examples/rails-4.2.5/db/migrate/20151119010415_create_posts.rb +0 -11
- data/examples/rails-4.2.5/db/schema.rb +0 -34
- data/examples/rails-4.2.5/db/seeds.rb +0 -7
- data/examples/rails-4.2.5/lib/assets/.keep +0 -0
- data/examples/rails-4.2.5/lib/tasks/.keep +0 -0
- data/examples/rails-4.2.5/log/.keep +0 -0
- data/examples/rails-4.2.5/public/404.html +0 -67
- data/examples/rails-4.2.5/public/422.html +0 -67
- data/examples/rails-4.2.5/public/500.html +0 -66
- data/examples/rails-4.2.5/public/favicon.ico +0 -0
- data/examples/rails-4.2.5/public/robots.txt +0 -5
- data/examples/rails-4.2.5/spec/rails_helper.rb +0 -62
- data/examples/rails-4.2.5/spec/requests/posts_spec.rb +0 -30
- data/examples/rails-4.2.5/spec/requests/users_spec.rb +0 -22
- data/examples/rails-4.2.5/spec/spec_helper.rb +0 -89
- data/examples/rails-4.2.5/tests-doc/README.md +0 -32
- data/examples/rails-4.2.5/tests-doc/api/posts/@id.md +0 -29
- data/examples/rails-4.2.5/tests-doc/api/posts.md +0 -39
- data/examples/rails-4.2.5/tests-doc/api/posts@with-filter.md +0 -40
- data/examples/rails-4.2.5/tests-doc/api/users/@id/posts.md +0 -24
- data/examples/rails-4.2.5/tests-doc/api/users.md +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0dbb038887cab8e4719329176f3e14fb2e941efc3d586f6ff69aa0408d082123
|
4
|
+
data.tar.gz: ad511d78cf585ab8378016390d44ab018ea8af396a1a66ef73cee28e9de74fdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b859ea0e46fd530e8b01c005ade4bf631c9f6f42b6f6fa9b0ce6ab5c51dd78c78d223500c37a2012895dd799134e971e64308d7ff54417ac20a66003b063bce
|
7
|
+
data.tar.gz: 2b395d17f5f002da43cae6a15e09b4d86794a801c7460aecb8c71e98c8436842230c20fce116f4931a3e6fa3b012336c8db41ba7352864e1543af68a2585de88
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.7.5
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
|
9
|
+
## [0.0.6] - 2022-03-16
|
10
|
+
### Changed
|
11
|
+
|
12
|
+
- Changed upper bound for Rails versions to 7. Added examples for Rails 6.1
|
13
|
+
- Updated Gemfile.lock in examples for Rails 4 and 5
|
14
|
+
|
15
|
+
## [0.0.5] - 2019-06-21
|
16
|
+
### Changed
|
17
|
+
|
18
|
+
- Sets the bounds for rails to versions 4 and 5. Of which there are examples.
|
19
|
+
- Excludes the examples from the gem.
|
data/lib/tests_doc/version.rb
CHANGED
data/tests_doc.gemspec
CHANGED
@@ -13,12 +13,12 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = "https://github.com/taskrabbit/tests_doc"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
|
-
spec.files = `git ls-files`.split($/)
|
16
|
+
spec.files = `git ls-files`.split($/).reject { |f| f =~ /^examples/ }
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "rails", '
|
21
|
+
spec.add_dependency "rails", '>= 4', '< 7.0'
|
22
22
|
spec.add_dependency "rspec", '>= 2.0'
|
23
23
|
spec.add_dependency "rspec-rails", '>= 2.0'
|
24
24
|
end
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tests_doc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Richard Lai
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
22
|
+
version: '7.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '4'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
32
|
+
version: '7.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rspec
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -62,64 +68,8 @@ files:
|
|
62
68
|
- ".gitignore"
|
63
69
|
- ".ruby-gemset"
|
64
70
|
- ".ruby-version"
|
71
|
+
- CHANGELOG.md
|
65
72
|
- README.md
|
66
|
-
- examples/rails-4.2.5/.gitignore
|
67
|
-
- examples/rails-4.2.5/.rspec
|
68
|
-
- examples/rails-4.2.5/Gemfile
|
69
|
-
- examples/rails-4.2.5/Gemfile.lock
|
70
|
-
- examples/rails-4.2.5/README.md
|
71
|
-
- examples/rails-4.2.5/Rakefile
|
72
|
-
- examples/rails-4.2.5/app/assets/images/.keep
|
73
|
-
- examples/rails-4.2.5/app/controllers/application_controller.rb
|
74
|
-
- examples/rails-4.2.5/app/controllers/concerns/.keep
|
75
|
-
- examples/rails-4.2.5/app/controllers/posts_controller.rb
|
76
|
-
- examples/rails-4.2.5/app/controllers/users_controller.rb
|
77
|
-
- examples/rails-4.2.5/app/mailers/.keep
|
78
|
-
- examples/rails-4.2.5/app/models/.keep
|
79
|
-
- examples/rails-4.2.5/app/models/concerns/.keep
|
80
|
-
- examples/rails-4.2.5/app/models/post.rb
|
81
|
-
- examples/rails-4.2.5/app/models/user.rb
|
82
|
-
- examples/rails-4.2.5/bin/bundle
|
83
|
-
- examples/rails-4.2.5/bin/rails
|
84
|
-
- examples/rails-4.2.5/bin/rake
|
85
|
-
- examples/rails-4.2.5/bin/setup
|
86
|
-
- examples/rails-4.2.5/bin/spring
|
87
|
-
- examples/rails-4.2.5/config.ru
|
88
|
-
- examples/rails-4.2.5/config/application.rb
|
89
|
-
- examples/rails-4.2.5/config/boot.rb
|
90
|
-
- examples/rails-4.2.5/config/database.yml
|
91
|
-
- examples/rails-4.2.5/config/environment.rb
|
92
|
-
- examples/rails-4.2.5/config/environments/development.rb
|
93
|
-
- examples/rails-4.2.5/config/environments/production.rb
|
94
|
-
- examples/rails-4.2.5/config/environments/test.rb
|
95
|
-
- examples/rails-4.2.5/config/initializers/filter_parameter_logging.rb
|
96
|
-
- examples/rails-4.2.5/config/initializers/secret_token.rb
|
97
|
-
- examples/rails-4.2.5/config/initializers/wrap_parameters.rb
|
98
|
-
- examples/rails-4.2.5/config/locales/en.yml
|
99
|
-
- examples/rails-4.2.5/config/routes.rb
|
100
|
-
- examples/rails-4.2.5/config/secrets.yml
|
101
|
-
- examples/rails-4.2.5/db/migrate/20151119010359_create_users.rb
|
102
|
-
- examples/rails-4.2.5/db/migrate/20151119010415_create_posts.rb
|
103
|
-
- examples/rails-4.2.5/db/schema.rb
|
104
|
-
- examples/rails-4.2.5/db/seeds.rb
|
105
|
-
- examples/rails-4.2.5/lib/assets/.keep
|
106
|
-
- examples/rails-4.2.5/lib/tasks/.keep
|
107
|
-
- examples/rails-4.2.5/log/.keep
|
108
|
-
- examples/rails-4.2.5/public/404.html
|
109
|
-
- examples/rails-4.2.5/public/422.html
|
110
|
-
- examples/rails-4.2.5/public/500.html
|
111
|
-
- examples/rails-4.2.5/public/favicon.ico
|
112
|
-
- examples/rails-4.2.5/public/robots.txt
|
113
|
-
- examples/rails-4.2.5/spec/rails_helper.rb
|
114
|
-
- examples/rails-4.2.5/spec/requests/posts_spec.rb
|
115
|
-
- examples/rails-4.2.5/spec/requests/users_spec.rb
|
116
|
-
- examples/rails-4.2.5/spec/spec_helper.rb
|
117
|
-
- examples/rails-4.2.5/tests-doc/README.md
|
118
|
-
- examples/rails-4.2.5/tests-doc/api/posts.md
|
119
|
-
- examples/rails-4.2.5/tests-doc/api/posts/@id.md
|
120
|
-
- examples/rails-4.2.5/tests-doc/api/posts@with-filter.md
|
121
|
-
- examples/rails-4.2.5/tests-doc/api/users.md
|
122
|
-
- examples/rails-4.2.5/tests-doc/api/users/@id/posts.md
|
123
73
|
- lib/tests_doc.rb
|
124
74
|
- lib/tests_doc/configuration.rb
|
125
75
|
- lib/tests_doc/disabled_record_spec_helper.rb
|
@@ -136,7 +86,7 @@ homepage: https://github.com/taskrabbit/tests_doc
|
|
136
86
|
licenses:
|
137
87
|
- MIT
|
138
88
|
metadata: {}
|
139
|
-
post_install_message:
|
89
|
+
post_install_message:
|
140
90
|
rdoc_options: []
|
141
91
|
require_paths:
|
142
92
|
- lib
|
@@ -151,9 +101,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
101
|
- !ruby/object:Gem::Version
|
152
102
|
version: '0'
|
153
103
|
requirements: []
|
154
|
-
|
155
|
-
|
156
|
-
signing_key:
|
104
|
+
rubygems_version: 3.1.6
|
105
|
+
signing_key:
|
157
106
|
specification_version: 4
|
158
107
|
summary: Rspec requests file to markdown
|
159
108
|
test_files: []
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
2
|
-
#
|
3
|
-
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
-
# or operating system, you probably want to add a global ignore instead:
|
5
|
-
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
-
|
7
|
-
# Ignore bundler config.
|
8
|
-
/.bundle
|
9
|
-
|
10
|
-
# Ignore the default SQLite database.
|
11
|
-
/db/*.sqlite3
|
12
|
-
/db/*.sqlite3-journal
|
13
|
-
|
14
|
-
# Ignore all logfiles and tempfiles.
|
15
|
-
/log/*
|
16
|
-
!/log/.keep
|
17
|
-
/tmp
|
18
|
-
|
19
|
-
/vendor
|
20
|
-
|
21
|
-
.byebug_history
|
data/examples/rails-4.2.5/.rspec
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
|
4
|
-
gem 'rails', '4.2.5'
|
5
|
-
|
6
|
-
gem 'rails-api'
|
7
|
-
|
8
|
-
gem 'spring', :group => :development
|
9
|
-
|
10
|
-
|
11
|
-
gem 'sqlite3'
|
12
|
-
|
13
|
-
# gem 'minitest', :group => :test
|
14
|
-
|
15
|
-
gem 'tests_doc', path: '../../../tests_doc', :group => :test
|
16
|
-
|
17
|
-
group :test, :development do
|
18
|
-
gem 'byebug'
|
19
|
-
gem 'rspec-rails', '~> 3.4'
|
20
|
-
end
|
21
|
-
|
22
|
-
# To use ActiveModel has_secure_password
|
23
|
-
# gem 'bcrypt', '~> 3.1.7'
|
24
|
-
|
25
|
-
# To use Jbuilder templates for JSON
|
26
|
-
# gem 'jbuilder'
|
27
|
-
|
28
|
-
# Use unicorn as the app server
|
29
|
-
# gem 'unicorn'
|
30
|
-
|
31
|
-
# Deploy with Capistrano
|
32
|
-
# gem 'capistrano', :group => :development
|
33
|
-
|
34
|
-
# To use debugger
|
35
|
-
# gem 'ruby-debug19', :require => 'ruby-debug'
|
@@ -1,143 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../../../tests_doc
|
3
|
-
specs:
|
4
|
-
tests_doc (0.0.3)
|
5
|
-
rails (~> 4.0)
|
6
|
-
rspec (>= 2.0)
|
7
|
-
rspec-rails (>= 2.0)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
actionmailer (4.2.5)
|
13
|
-
actionpack (= 4.2.5)
|
14
|
-
actionview (= 4.2.5)
|
15
|
-
activejob (= 4.2.5)
|
16
|
-
mail (~> 2.5, >= 2.5.4)
|
17
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
18
|
-
actionpack (4.2.5)
|
19
|
-
actionview (= 4.2.5)
|
20
|
-
activesupport (= 4.2.5)
|
21
|
-
rack (~> 1.6)
|
22
|
-
rack-test (~> 0.6.2)
|
23
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
24
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
25
|
-
actionview (4.2.5)
|
26
|
-
activesupport (= 4.2.5)
|
27
|
-
builder (~> 3.1)
|
28
|
-
erubis (~> 2.7.0)
|
29
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
30
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
31
|
-
activejob (4.2.5)
|
32
|
-
activesupport (= 4.2.5)
|
33
|
-
globalid (>= 0.3.0)
|
34
|
-
activemodel (4.2.5)
|
35
|
-
activesupport (= 4.2.5)
|
36
|
-
builder (~> 3.1)
|
37
|
-
activerecord (4.2.5)
|
38
|
-
activemodel (= 4.2.5)
|
39
|
-
activesupport (= 4.2.5)
|
40
|
-
arel (~> 6.0)
|
41
|
-
activesupport (4.2.5)
|
42
|
-
i18n (~> 0.7)
|
43
|
-
json (~> 1.7, >= 1.7.7)
|
44
|
-
minitest (~> 5.1)
|
45
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
46
|
-
tzinfo (~> 1.1)
|
47
|
-
arel (6.0.3)
|
48
|
-
builder (3.2.2)
|
49
|
-
byebug (8.2.0)
|
50
|
-
diff-lcs (1.2.5)
|
51
|
-
erubis (2.7.0)
|
52
|
-
globalid (0.3.6)
|
53
|
-
activesupport (>= 4.1.0)
|
54
|
-
i18n (0.7.0)
|
55
|
-
json (1.8.3)
|
56
|
-
loofah (2.0.3)
|
57
|
-
nokogiri (>= 1.5.9)
|
58
|
-
mail (2.6.3)
|
59
|
-
mime-types (>= 1.16, < 3)
|
60
|
-
mime-types (2.6.2)
|
61
|
-
mini_portile2 (2.0.0)
|
62
|
-
minitest (5.8.3)
|
63
|
-
nokogiri (1.6.7)
|
64
|
-
mini_portile2 (~> 2.0.0.rc2)
|
65
|
-
rack (1.6.4)
|
66
|
-
rack-test (0.6.3)
|
67
|
-
rack (>= 1.0)
|
68
|
-
rails (4.2.5)
|
69
|
-
actionmailer (= 4.2.5)
|
70
|
-
actionpack (= 4.2.5)
|
71
|
-
actionview (= 4.2.5)
|
72
|
-
activejob (= 4.2.5)
|
73
|
-
activemodel (= 4.2.5)
|
74
|
-
activerecord (= 4.2.5)
|
75
|
-
activesupport (= 4.2.5)
|
76
|
-
bundler (>= 1.3.0, < 2.0)
|
77
|
-
railties (= 4.2.5)
|
78
|
-
sprockets-rails
|
79
|
-
rails-api (0.4.0)
|
80
|
-
actionpack (>= 3.2.11)
|
81
|
-
railties (>= 3.2.11)
|
82
|
-
rails-deprecated_sanitizer (1.0.3)
|
83
|
-
activesupport (>= 4.2.0.alpha)
|
84
|
-
rails-dom-testing (1.0.7)
|
85
|
-
activesupport (>= 4.2.0.beta, < 5.0)
|
86
|
-
nokogiri (~> 1.6.0)
|
87
|
-
rails-deprecated_sanitizer (>= 1.0.1)
|
88
|
-
rails-html-sanitizer (1.0.2)
|
89
|
-
loofah (~> 2.0)
|
90
|
-
railties (4.2.5)
|
91
|
-
actionpack (= 4.2.5)
|
92
|
-
activesupport (= 4.2.5)
|
93
|
-
rake (>= 0.8.7)
|
94
|
-
thor (>= 0.18.1, < 2.0)
|
95
|
-
rake (10.4.2)
|
96
|
-
rspec (3.4.0)
|
97
|
-
rspec-core (~> 3.4.0)
|
98
|
-
rspec-expectations (~> 3.4.0)
|
99
|
-
rspec-mocks (~> 3.4.0)
|
100
|
-
rspec-core (3.4.1)
|
101
|
-
rspec-support (~> 3.4.0)
|
102
|
-
rspec-expectations (3.4.0)
|
103
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
104
|
-
rspec-support (~> 3.4.0)
|
105
|
-
rspec-mocks (3.4.0)
|
106
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
107
|
-
rspec-support (~> 3.4.0)
|
108
|
-
rspec-rails (3.4.0)
|
109
|
-
actionpack (>= 3.0, < 4.3)
|
110
|
-
activesupport (>= 3.0, < 4.3)
|
111
|
-
railties (>= 3.0, < 4.3)
|
112
|
-
rspec-core (~> 3.4.0)
|
113
|
-
rspec-expectations (~> 3.4.0)
|
114
|
-
rspec-mocks (~> 3.4.0)
|
115
|
-
rspec-support (~> 3.4.0)
|
116
|
-
rspec-support (3.4.1)
|
117
|
-
spring (1.4.4)
|
118
|
-
sprockets (3.4.0)
|
119
|
-
rack (> 1, < 3)
|
120
|
-
sprockets-rails (2.3.3)
|
121
|
-
actionpack (>= 3.0)
|
122
|
-
activesupport (>= 3.0)
|
123
|
-
sprockets (>= 2.8, < 4.0)
|
124
|
-
sqlite3 (1.3.11)
|
125
|
-
thor (0.19.1)
|
126
|
-
thread_safe (0.3.5)
|
127
|
-
tzinfo (1.2.2)
|
128
|
-
thread_safe (~> 0.1)
|
129
|
-
|
130
|
-
PLATFORMS
|
131
|
-
ruby
|
132
|
-
|
133
|
-
DEPENDENCIES
|
134
|
-
byebug
|
135
|
-
rails (= 4.2.5)
|
136
|
-
rails-api
|
137
|
-
rspec-rails (~> 3.4)
|
138
|
-
spring
|
139
|
-
sqlite3
|
140
|
-
tests_doc!
|
141
|
-
|
142
|
-
BUNDLED WITH
|
143
|
-
1.10.6
|
File without changes
|
File without changes
|
@@ -1,61 +0,0 @@
|
|
1
|
-
class PostsController < ApplicationController
|
2
|
-
before_action :set_post, only: [:show, :update, :destroy]
|
3
|
-
|
4
|
-
# GET /posts
|
5
|
-
# GET /posts.json
|
6
|
-
def index
|
7
|
-
@posts = Post
|
8
|
-
@posts = @posts.where(user_id: params[:user_id]) if params[:user_id]
|
9
|
-
@posts = @posts.all
|
10
|
-
|
11
|
-
render json: @posts
|
12
|
-
end
|
13
|
-
|
14
|
-
# GET /posts/1
|
15
|
-
# GET /posts/1.json
|
16
|
-
def show
|
17
|
-
render json: @post
|
18
|
-
end
|
19
|
-
|
20
|
-
# POST /posts
|
21
|
-
# POST /posts.json
|
22
|
-
def create
|
23
|
-
@post = Post.new(post_params)
|
24
|
-
|
25
|
-
if @post.save
|
26
|
-
render json: @post, status: :created, location: @post
|
27
|
-
else
|
28
|
-
render json: @post.errors, status: :unprocessable_entity
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
# PATCH/PUT /posts/1
|
33
|
-
# PATCH/PUT /posts/1.json
|
34
|
-
def update
|
35
|
-
@post = Post.find(params[:id])
|
36
|
-
|
37
|
-
if @post.update(post_params)
|
38
|
-
head :no_content
|
39
|
-
else
|
40
|
-
render json: @post.errors, status: :unprocessable_entity
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
# DELETE /posts/1
|
45
|
-
# DELETE /posts/1.json
|
46
|
-
def destroy
|
47
|
-
@post.destroy
|
48
|
-
|
49
|
-
head :no_content
|
50
|
-
end
|
51
|
-
|
52
|
-
private
|
53
|
-
|
54
|
-
def set_post
|
55
|
-
@post = Post.find(params[:id])
|
56
|
-
end
|
57
|
-
|
58
|
-
def post_params
|
59
|
-
params.require(:post).permit(:title, :body, :user_id)
|
60
|
-
end
|
61
|
-
end
|
@@ -1,59 +0,0 @@
|
|
1
|
-
class UsersController < ApplicationController
|
2
|
-
before_action :set_user, only: [:show, :update, :destroy]
|
3
|
-
|
4
|
-
# GET /users
|
5
|
-
# GET /users.json
|
6
|
-
def index
|
7
|
-
@users = User.all
|
8
|
-
|
9
|
-
render json: @users
|
10
|
-
end
|
11
|
-
|
12
|
-
# GET /users/1
|
13
|
-
# GET /users/1.json
|
14
|
-
def show
|
15
|
-
render json: @user
|
16
|
-
end
|
17
|
-
|
18
|
-
# POST /users
|
19
|
-
# POST /users.json
|
20
|
-
def create
|
21
|
-
@user = User.new(user_params)
|
22
|
-
|
23
|
-
if @user.save
|
24
|
-
render json: @user, status: :created, location: @user
|
25
|
-
else
|
26
|
-
render json: @user.errors, status: :unprocessable_entity
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
# PATCH/PUT /users/1
|
31
|
-
# PATCH/PUT /users/1.json
|
32
|
-
def update
|
33
|
-
@user = User.find(params[:id])
|
34
|
-
|
35
|
-
if @user.update(user_params)
|
36
|
-
head :no_content
|
37
|
-
else
|
38
|
-
render json: @user.errors, status: :unprocessable_entity
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
# DELETE /users/1
|
43
|
-
# DELETE /users/1.json
|
44
|
-
def destroy
|
45
|
-
@user.destroy
|
46
|
-
|
47
|
-
head :no_content
|
48
|
-
end
|
49
|
-
|
50
|
-
private
|
51
|
-
|
52
|
-
def set_user
|
53
|
-
@user = User.find(params[:id])
|
54
|
-
end
|
55
|
-
|
56
|
-
def user_params
|
57
|
-
params.require(:user).permit(:email, :first_name, :last_name)
|
58
|
-
end
|
59
|
-
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,9 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
begin
|
3
|
-
load File.expand_path('../spring', __FILE__)
|
4
|
-
rescue LoadError => e
|
5
|
-
raise unless e.message.include?('spring')
|
6
|
-
end
|
7
|
-
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
8
|
-
require_relative '../config/boot'
|
9
|
-
require 'rails/commands'
|
@@ -1,29 +0,0 @@
|
|
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
|
@@ -1,15 +0,0 @@
|
|
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
|
@@ -1,26 +0,0 @@
|
|
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 Rails425
|
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
|