Skip to content

Commit a76d706

Browse files
Adapt to rails plugin structure.
1 parent 0d11175 commit a76d706

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+928
-66
lines changed

.gitignore

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# rcov generated
2-
coverage
3-
coverage.data
4-
5-
# rdoc generated
6-
rdoc
7-
81
# yard generated
92
doc
103
.yardoc
@@ -15,7 +8,14 @@ doc
158
# jeweler generated
169
pkg
1710

18-
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
11+
# rails stuff
12+
log/*.log
13+
test/dummy/db/*.sqlite3
14+
test/dummy/log/*.log
15+
test/dummy/tmp/
16+
test/dummy/.sass-cache
17+
18+
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
1919
#
2020
# * Create a file at ~/.gitignore
2121
# * Include files you want ignored
@@ -28,22 +28,4 @@ pkg
2828
#
2929
# For MacOS:
3030
#
31-
#.DS_Store
32-
33-
# For TextMate
34-
#*.tmproj
35-
#tmtags
36-
37-
# For emacs:
38-
#*~
39-
#\#*
40-
#.\#*
41-
42-
# For vim:
43-
#*.swp
44-
45-
# For redcar:
46-
#.redcar
47-
48-
# For rubinius:
49-
#*.rbc
31+
.DS_Store

.rvmrc

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env bash
2+
3+
# This is an RVM Project .rvmrc file, used to automatically load the ruby
4+
# development environment upon cd'ing into the directory
5+
6+
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
7+
# Only full ruby name is supported here, for short names use:
8+
# echo "rvm use 1.9.3" > .rvmrc
9+
environment_id="ruby-1.9.3-p125@grape-swagger"
10+
11+
# Uncomment the following lines if you want to verify rvm version per project
12+
# rvmrc_rvm_version="1.14.3 (stable)" # 1.10.1 seams as a safe start
13+
# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
14+
# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
15+
# return 1
16+
# }
17+
18+
# First we attempt to load the desired environment directly from the environment
19+
# file. This is very fast and efficient compared to running through the entire
20+
# CLI and selector. If you want feedback on which environment was used then
21+
# insert the word 'use' after --create as this triggers verbose mode.
22+
if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
23+
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
24+
then
25+
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
26+
[[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
27+
\. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
28+
else
29+
# If the environment file has not yet been created, use the RVM CLI to select.
30+
rvm --create "$environment_id" || {
31+
echo "Failed to create RVM environment '${environment_id}'."
32+
return 1
33+
}
34+
fi
35+
36+
# If you use bundler, this might be useful to you:
37+
# if [[ -s Gemfile ]] && {
38+
# ! builtin command -v bundle >/dev/null ||
39+
# builtin command -v bundle | GREP_OPTIONS= \grep $rvm_path/bin/bundle >/dev/null
40+
# }
41+
# then
42+
# printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
43+
# gem install bundler
44+
# fi
45+
# if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
46+
# then
47+
# bundle install | GREP_OPTIONS= \grep -vE '^Using|Your bundle is complete'
48+
# fi

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ group :development do
1212
gem "rdoc", "~> 3.12"
1313
gem "bundler", "> 1.0.0"
1414
gem "jeweler", "~> 1.8.4"
15+
# jquery-rails is used by the dummy application
16+
gem "jquery-rails"
17+
gem "rails", "~> 3.2"
18+
gem "sqlite3"
1519
end

Gemfile.lock

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,36 @@
11
GEM
22
remote: http://rubygems.org/
33
specs:
4+
actionmailer (3.2.6)
5+
actionpack (= 3.2.6)
6+
mail (~> 2.4.4)
7+
actionpack (3.2.6)
8+
activemodel (= 3.2.6)
9+
activesupport (= 3.2.6)
10+
builder (~> 3.0.0)
11+
erubis (~> 2.7.0)
12+
journey (~> 1.0.1)
13+
rack (~> 1.4.0)
14+
rack-cache (~> 1.2)
15+
rack-test (~> 0.6.1)
16+
sprockets (~> 2.1.3)
17+
activemodel (3.2.6)
18+
activesupport (= 3.2.6)
19+
builder (~> 3.0.0)
20+
activerecord (3.2.6)
21+
activemodel (= 3.2.6)
22+
activesupport (= 3.2.6)
23+
arel (~> 3.0.2)
24+
tzinfo (~> 0.3.29)
25+
activeresource (3.2.6)
26+
activemodel (= 3.2.6)
27+
activesupport (= 3.2.6)
428
activesupport (3.2.6)
529
i18n (~> 0.6)
630
multi_json (~> 1.0)
31+
arel (3.0.2)
32+
builder (3.0.0)
33+
erubis (2.7.0)
734
git (1.2.5)
835
grape (0.2.1)
936
hashie (~> 1.2)
@@ -12,18 +39,50 @@ GEM
1239
rack
1340
rack-mount
1441
hashie (1.2.0)
42+
hike (1.2.1)
1543
i18n (0.6.0)
1644
jeweler (1.8.4)
1745
bundler (~> 1.0)
1846
git (>= 1.2.5)
1947
rake
2048
rdoc
49+
journey (1.0.4)
50+
jquery-rails (2.0.2)
51+
railties (>= 3.2.0, < 5.0)
52+
thor (~> 0.14)
2153
json (1.7.3)
54+
mail (2.4.4)
55+
i18n (>= 0.4.0)
56+
mime-types (~> 1.16)
57+
treetop (~> 1.4.8)
58+
mime-types (1.19)
2259
multi_json (1.3.6)
2360
multi_xml (0.5.1)
61+
polyglot (0.3.3)
2462
rack (1.4.1)
63+
rack-cache (1.2)
64+
rack (>= 0.4)
2565
rack-mount (0.8.3)
2666
rack (>= 1.0.0)
67+
rack-ssl (1.3.2)
68+
rack
69+
rack-test (0.6.1)
70+
rack (>= 1.0)
71+
rails (3.2.6)
72+
actionmailer (= 3.2.6)
73+
actionpack (= 3.2.6)
74+
activerecord (= 3.2.6)
75+
activeresource (= 3.2.6)
76+
activesupport (= 3.2.6)
77+
bundler (~> 1.0)
78+
railties (= 3.2.6)
79+
railties (3.2.6)
80+
actionpack (= 3.2.6)
81+
activesupport (= 3.2.6)
82+
rack-ssl (~> 1.3.2)
83+
rake (>= 0.8.7)
84+
rdoc (~> 3.4)
85+
thor (>= 0.14.6, < 2.0)
2786
rake (0.9.2.2)
2887
rdoc (3.12)
2988
json (~> 1.4)
@@ -33,6 +92,17 @@ GEM
3392
shoulda-context (1.0.0)
3493
shoulda-matchers (1.2.0)
3594
activesupport (>= 3.0.0)
95+
sprockets (2.1.3)
96+
hike (~> 1.2)
97+
rack (~> 1.0)
98+
tilt (~> 1.1, != 1.3.0)
99+
sqlite3 (1.3.6)
100+
thor (0.15.4)
101+
tilt (1.3.3)
102+
treetop (1.4.10)
103+
polyglot
104+
polyglot (>= 0.3.1)
105+
tzinfo (0.3.33)
36106

37107
PLATFORMS
38108
ruby
@@ -41,5 +111,8 @@ DEPENDENCIES
41111
bundler (> 1.0.0)
42112
grape
43113
jeweler (~> 1.8.4)
114+
jquery-rails
115+
rails (~> 3.2)
44116
rdoc (~> 3.12)
45117
shoulda
118+
sqlite3

Rakefile

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,18 @@ Jeweler::Tasks.new do |gem|
2525
end
2626
Jeweler::RubygemsDotOrgTasks.new
2727

28-
require 'rake/testtask'
29-
Rake::TestTask.new(:test) do |test|
30-
test.libs << 'lib' << 'test'
31-
test.pattern = 'test/**/test_*.rb'
32-
test.verbose = true
33-
end
3428

35-
task :default => :test
3629

37-
require 'rdoc/task'
38-
Rake::RDocTask.new do |rdoc|
39-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
30+
Bundler::GemHelper.install_tasks
31+
32+
require 'rake/testtask'
4033

41-
rdoc.rdoc_dir = 'rdoc'
42-
rdoc.title = "grape-swagger #{version}"
43-
rdoc.rdoc_files.include('README*')
44-
rdoc.rdoc_files.include('lib/**/*.rb')
34+
Rake::TestTask.new(:test) do |t|
35+
t.libs << 'lib'
36+
t.libs << 'test'
37+
t.pattern = 'test/**/*_test.rb'
38+
t.verbose = false
4539
end
40+
41+
42+
task :default => :test

0 commit comments

Comments
 (0)