ki 0.3.3 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.rspec +1 -1
  4. data/.ruby-gemset +1 -0
  5. data/.ruby-version +1 -0
  6. data/Gemfile +2 -21
  7. data/Gemfile.lock +60 -100
  8. data/Guardfile +1 -1
  9. data/LICENSE.md +21 -0
  10. data/README.md +63 -0
  11. data/Rakefile +3 -45
  12. data/bin/ki +1 -1
  13. data/ki.gemspec +31 -137
  14. data/lib/ki.rb +21 -21
  15. data/lib/ki/api_error.rb +28 -0
  16. data/lib/ki/base_request.rb +34 -0
  17. data/lib/ki/helpers.rb +55 -0
  18. data/lib/ki/ki.rb +40 -0
  19. data/lib/ki/ki_cli.rb +46 -0
  20. data/lib/ki/ki_config.rb +20 -0
  21. data/lib/ki/middleware.rb +155 -0
  22. data/lib/ki/model.rb +70 -0
  23. data/lib/{modules → ki/modules}/callbacks.rb +0 -0
  24. data/lib/ki/modules/format_of.rb +10 -0
  25. data/lib/{modules → ki/modules}/model_helpers.rb +0 -12
  26. data/lib/ki/modules/public_file_helper.rb +13 -0
  27. data/lib/ki/modules/query_interface.rb +36 -0
  28. data/lib/{modules → ki/modules}/restrictions.rb +0 -30
  29. data/lib/ki/modules/view_helper.rb +13 -0
  30. data/lib/ki/orm.rb +65 -0
  31. data/lib/ki/version.rb +3 -0
  32. data/spec/examples/base/.ruby-gemset +1 -0
  33. data/spec/examples/base/.ruby-version +1 -0
  34. data/spec/examples/base/Gemfile +4 -0
  35. data/spec/examples/base/app.rb +1 -0
  36. data/{examples → spec/examples}/base/config.ru +0 -3
  37. data/spec/examples/base/config.yml +17 -0
  38. data/spec/examples/base/public/favicon.ico +0 -0
  39. data/spec/examples/base/public/javascripts/.gitkeep +0 -0
  40. data/spec/examples/base/public/stylesheets/.gitkeep +0 -0
  41. data/spec/examples/base/views/index.haml +6 -0
  42. data/spec/examples/couch-lock/.ruby-gemset +1 -0
  43. data/spec/examples/couch-lock/.ruby-version +1 -0
  44. data/spec/examples/couch-lock/Gemfile +4 -0
  45. data/spec/examples/couch-lock/Gemfile.lock +48 -0
  46. data/spec/examples/couch-lock/app.rb +42 -0
  47. data/spec/examples/couch-lock/config.ru +3 -0
  48. data/spec/examples/couch-lock/config.yml +17 -0
  49. data/spec/examples/couch-lock/install.sh +3 -0
  50. data/spec/examples/couch-lock/public/favicon.ico +0 -0
  51. data/spec/examples/couch-lock/public/javascripts/.gitkeep +0 -0
  52. data/spec/examples/couch-lock/public/stylesheets/.gitkeep +0 -0
  53. data/spec/examples/couch-lock/views/index.haml +18 -0
  54. data/spec/examples/json.northpole.ro/.ruby-gemset +1 -0
  55. data/spec/examples/json.northpole.ro/.ruby-version +1 -0
  56. data/spec/examples/json.northpole.ro/Capfile +25 -0
  57. data/spec/examples/json.northpole.ro/Gemfile +6 -0
  58. data/spec/examples/json.northpole.ro/Gemfile.lock +68 -0
  59. data/spec/examples/json.northpole.ro/app.rb +79 -0
  60. data/spec/examples/json.northpole.ro/client.rb +25 -0
  61. data/spec/examples/json.northpole.ro/config.ru +3 -0
  62. data/spec/examples/json.northpole.ro/config.yml +17 -0
  63. data/spec/examples/json.northpole.ro/config/deploy.rb +59 -0
  64. data/spec/examples/json.northpole.ro/config/deploy/production.rb +39 -0
  65. data/spec/examples/json.northpole.ro/foo.rb +10 -0
  66. data/spec/examples/json.northpole.ro/public/JNorthPole.jar +0 -0
  67. data/spec/examples/json.northpole.ro/public/favicon.ico +0 -0
  68. data/spec/examples/json.northpole.ro/public/font/FontAwesome.otf +0 -0
  69. data/spec/examples/json.northpole.ro/public/font/fontawesome-webfont.eot +0 -0
  70. data/spec/examples/json.northpole.ro/public/font/fontawesome-webfont.svg +284 -0
  71. data/spec/examples/json.northpole.ro/public/font/fontawesome-webfont.ttf +0 -0
  72. data/spec/examples/json.northpole.ro/public/font/fontawesome-webfont.woff +0 -0
  73. data/spec/examples/json.northpole.ro/public/images/bear.png +0 -0
  74. data/spec/examples/json.northpole.ro/public/images/bg.png +0 -0
  75. data/spec/examples/json.northpole.ro/public/images/cloud.png +0 -0
  76. data/spec/examples/json.northpole.ro/public/images/dotnet.png +0 -0
  77. data/spec/examples/json.northpole.ro/public/images/dotnet_small.png +0 -0
  78. data/spec/examples/json.northpole.ro/public/images/footer.png +0 -0
  79. data/spec/examples/json.northpole.ro/public/images/glyphicons-halflings-white.png +0 -0
  80. data/spec/examples/json.northpole.ro/public/images/glyphicons-halflings.png +0 -0
  81. data/spec/examples/json.northpole.ro/public/images/ice.png +0 -0
  82. data/spec/examples/json.northpole.ro/public/images/java.png +0 -0
  83. data/spec/examples/json.northpole.ro/public/images/java_small.png +0 -0
  84. data/spec/examples/json.northpole.ro/public/images/json.png +0 -0
  85. data/spec/examples/json.northpole.ro/public/images/json_small.png +0 -0
  86. data/spec/examples/json.northpole.ro/public/images/logo.png +0 -0
  87. data/spec/examples/json.northpole.ro/public/images/mobile.png +0 -0
  88. data/spec/examples/json.northpole.ro/public/images/php.png +0 -0
  89. data/spec/examples/json.northpole.ro/public/images/php_small.png +0 -0
  90. data/spec/examples/json.northpole.ro/public/images/python.png +0 -0
  91. data/spec/examples/json.northpole.ro/public/images/python_small.png +0 -0
  92. data/spec/examples/json.northpole.ro/public/images/ruby.png +0 -0
  93. data/spec/examples/json.northpole.ro/public/images/ruby_small.png +0 -0
  94. data/spec/examples/json.northpole.ro/public/images/shell.png +0 -0
  95. data/spec/examples/json.northpole.ro/public/images/shell_small.png +0 -0
  96. data/spec/examples/json.northpole.ro/public/javascripts/analytics.js +9 -0
  97. data/spec/examples/json.northpole.ro/public/javascripts/app.coffee +133 -0
  98. data/spec/examples/json.northpole.ro/public/javascripts/docs.min.js +16 -0
  99. data/spec/examples/json.northpole.ro/public/javascripts/jnorthpole.coffee +34 -0
  100. data/spec/examples/json.northpole.ro/public/javascripts/util.coffee +31 -0
  101. data/spec/examples/json.northpole.ro/public/stylesheets/app.sass +23 -0
  102. data/spec/examples/json.northpole.ro/public/stylesheets/application.sass +222 -0
  103. data/spec/examples/json.northpole.ro/public/stylesheets/cover.css +154 -0
  104. data/spec/examples/json.northpole.ro/views/curl.haml +19 -0
  105. data/spec/examples/json.northpole.ro/views/doc.haml +16 -0
  106. data/spec/examples/json.northpole.ro/views/doc_table.haml +45 -0
  107. data/spec/examples/json.northpole.ro/views/dotnet.haml +24 -0
  108. data/spec/examples/json.northpole.ro/views/examples.haml +28 -0
  109. data/spec/examples/json.northpole.ro/views/faq.haml +32 -0
  110. data/spec/examples/json.northpole.ro/views/foo.haml +7 -0
  111. data/spec/examples/json.northpole.ro/views/index.haml +4 -0
  112. data/spec/examples/json.northpole.ro/views/java.haml +0 -0
  113. data/spec/examples/json.northpole.ro/views/layout.haml +42 -0
  114. data/spec/examples/json.northpole.ro/views/php.haml +37 -0
  115. data/spec/examples/json.northpole.ro/views/playground.haml +38 -0
  116. data/spec/examples/json.northpole.ro/views/python.haml +17 -0
  117. data/spec/examples/json.northpole.ro/views/ruby.haml +12 -0
  118. data/spec/examples/json.northpole.ro/views/signup.haml +2 -0
  119. data/spec/examples/json.northpole.ro/views/thanks.haml +12 -0
  120. data/spec/functional_spec.rb +4 -0
  121. data/spec/lib/ki/base_request_spec.rb +88 -0
  122. data/spec/lib/ki/helpers_spec.rb +12 -0
  123. data/spec/lib/ki/ki_config_spec.rb +7 -0
  124. data/spec/lib/ki/middleware_spec.rb +11 -0
  125. data/spec/lib/ki/model_spec.rb +100 -0
  126. data/spec/lib/ki/modules/format_of_spec.rb +15 -0
  127. data/spec/lib/ki/orm_spec.rb +83 -0
  128. data/spec/spec_helper.rb +18 -5
  129. data/spec/util_spec.rb +7 -36
  130. metadata +269 -193
  131. data/.document +0 -5
  132. data/.rvmrc +0 -1
  133. data/LICENSE.txt +0 -20
  134. data/README.rdoc +0 -3
  135. data/VERSION +0 -1
  136. data/examples/base/Gemfile +0 -3
  137. data/examples/base/Gemfile.lock +0 -24
  138. data/examples/base/app.rb +0 -4
  139. data/examples/base/config.yml +0 -16
  140. data/gfx/colors.xcf +0 -0
  141. data/gfx/ki3.eps +0 -0
  142. data/gfx/logo.png +0 -0
  143. data/ki_wrap.rb +0 -35
  144. data/lib/conf.rb +0 -28
  145. data/lib/db.rb +0 -73
  146. data/lib/helpers.rb +0 -34
  147. data/lib/ki_cli.rb +0 -76
  148. data/lib/mockreq.rb +0 -45
  149. data/lib/model.rb +0 -110
  150. data/lib/modules/email.rb +0 -51
  151. data/lib/modules/query_interface.rb +0 -42
  152. data/lib/req.rb +0 -57
  153. data/lib/resp.rb +0 -70
  154. data/lib/static_file.rb +0 -68
  155. data/lib/util.rb +0 -114
  156. data/lib/views/404.haml +0 -1
  157. data/lib/views/406.haml +0 -1
  158. data/lib/views/index.haml +0 -7
  159. data/lib/views/layout.haml +0 -1
  160. data/spec/conf_spec.rb +0 -6
  161. data/spec/db_spec.rb +0 -93
  162. data/spec/integration/integration_spec.rb +0 -114
  163. data/spec/ki_spec.rb +0 -7
  164. data/spec/model_spec.rb +0 -91
  165. data/spec/modules/callbacks_spec.rb +0 -25
  166. data/spec/modules/email_spec.rb +0 -19
  167. data/spec/modules/query_interface_spec.rb +0 -93
  168. data/spec/modules/restrictions_spec.rb +0 -110
  169. data/spec/performance/performance.sh +0 -1
  170. data/spec/req_spec.rb +0 -29
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8d3882f219cbe5267ace949b299161f8d7088de4
4
+ data.tar.gz: dbd684f59faf3cb6ed83dcce014f7f6c024bd4b9
5
+ SHA512:
6
+ metadata.gz: 906832115b4f414a7c78d00ca31bc9bcd4b1a1eb5f7e18e5f341a7794c364b6caf2738b9ae123b6a4afbca4d0328342512c66e3e38e920cacdf4fc34806015db
7
+ data.tar.gz: 54f9f057d005f7ce0697b4584b3af94ceb5f0bcfdccb5d14282d19f1eeaa61dc9ceeb70a0c0179ded589898ca015f02b5ecc59b78e0e3628b9a8ce47e737af53
@@ -0,0 +1,10 @@
1
+ *.gem
2
+ *.rbc
3
+ /pkg/
4
+ /spec/reports/
5
+ /tmp/
6
+
7
+ /.bundle/
8
+
9
+ spec/examples/*/tmp
10
+ spec/examples/*/log
data/.rspec CHANGED
@@ -1 +1 @@
1
- --color
1
+ --colour
@@ -0,0 +1 @@
1
+ ki
@@ -0,0 +1 @@
1
+ 2.1.0
data/Gemfile CHANGED
@@ -1,22 +1,3 @@
1
- source "http://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
- gem "rack"
4
- gem "mongo"
5
- gem "bson_ext"
6
- gem "thor"
7
- gem "haml"
8
- gem "sass"
9
- gem "coffee-script"
10
- gem "thin"
11
- gem "mail"
12
- gem "json"
13
-
14
- group :development do
15
- gem "rspec"
16
- gem "guard-rspec"
17
- gem 'rb-inotify', '~> 0.8.8' # for guard-rspec
18
- gem "rdoc"
19
- gem "bundler"
20
- gem "jeweler"
21
- gem "simplecov"
22
- end
3
+ gemspec
@@ -1,131 +1,91 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ki (0.4.1)
5
+ bson_ext
6
+ bundler (~> 1.5)
7
+ coffee-script
8
+ haml
9
+ mongo
10
+ rack
11
+ rack-parser
12
+ sass
13
+ thor
14
+
1
15
  GEM
2
- remote: http://rubygems.org/
16
+ remote: https://rubygems.org/
3
17
  specs:
4
- addressable (2.3.5)
5
18
  bson (1.9.2)
6
19
  bson_ext (1.9.2)
7
20
  bson (~> 1.9.2)
8
- builder (3.2.2)
9
- coderay (1.0.9)
21
+ celluloid (0.15.2)
22
+ timers (~> 1.1.0)
23
+ celluloid-io (0.15.0)
24
+ celluloid (>= 0.15.0)
25
+ nio4r (>= 0.5.0)
26
+ coderay (1.1.0)
10
27
  coffee-script (2.2.0)
11
28
  coffee-script-source
12
29
  execjs
13
- coffee-script-source (1.6.3)
14
- daemons (1.1.9)
15
- diff-lcs (1.2.4)
16
- eventmachine (1.0.3)
17
- execjs (2.0.0)
18
- faraday (0.8.8)
19
- multipart-post (~> 1.2.0)
20
- ffi (1.9.0)
30
+ coffee-script-source (1.7.0)
31
+ diff-lcs (1.2.5)
32
+ execjs (2.0.2)
33
+ ffi (1.9.3)
21
34
  formatador (0.2.4)
22
- git (1.2.6)
23
- github_api (0.10.1)
24
- addressable
25
- faraday (~> 0.8.1)
26
- hashie (>= 1.2)
27
- multi_json (~> 1.4)
28
- nokogiri (~> 1.5.2)
29
- oauth2
30
- guard (1.7.0)
35
+ guard (2.5.1)
31
36
  formatador (>= 0.2.4)
32
- listen (>= 0.6.0)
33
- lumberjack (>= 1.0.2)
34
- pry (>= 0.9.10)
35
- thor (>= 0.14.6)
36
- guard-rspec (2.5.4)
37
- guard (>= 1.1)
38
- rspec (~> 2.11)
39
- haml (4.0.3)
37
+ listen (~> 2.6)
38
+ lumberjack (~> 1.0)
39
+ pry (>= 0.9.12)
40
+ thor (>= 0.18.1)
41
+ guard-rspec (4.2.8)
42
+ guard (~> 2.1)
43
+ rspec (>= 2.14, < 4.0)
44
+ haml (4.0.5)
40
45
  tilt
41
- hashie (2.0.5)
42
- highline (1.6.19)
43
- httpauth (0.2.0)
44
- jeweler (1.8.7)
45
- builder
46
- bundler (~> 1.0)
47
- git (>= 1.2.5)
48
- github_api (= 0.10.1)
49
- highline (>= 1.6.15)
50
- nokogiri (= 1.5.10)
51
- rake
52
- rdoc
53
- json (1.8.0)
54
- jwt (0.1.8)
55
- multi_json (>= 1.5)
56
- listen (0.7.3)
57
- lumberjack (1.0.4)
58
- mail (2.5.4)
59
- mime-types (~> 1.16)
60
- treetop (~> 1.4.8)
46
+ listen (2.7.1)
47
+ celluloid (>= 0.15.2)
48
+ celluloid-io (>= 0.15.0)
49
+ rb-fsevent (>= 0.9.3)
50
+ rb-inotify (>= 0.9)
51
+ lumberjack (1.0.5)
61
52
  method_source (0.8.2)
62
- mime-types (1.24)
63
53
  mongo (1.9.2)
64
54
  bson (~> 1.9.2)
65
- multi_json (1.7.9)
66
- multi_xml (0.5.5)
67
- multipart-post (1.2.0)
68
- nokogiri (1.5.10)
69
- oauth2 (0.9.2)
70
- faraday (~> 0.8)
71
- httpauth (~> 0.2)
72
- jwt (~> 0.1.4)
73
- multi_json (~> 1.0)
74
- multi_xml (~> 0.5)
75
- rack (~> 1.2)
76
- polyglot (0.3.3)
77
- pry (0.9.12.2)
78
- coderay (~> 1.0.5)
55
+ nio4r (1.0.0)
56
+ pry (0.9.12.6)
57
+ coderay (~> 1.0)
79
58
  method_source (~> 0.8)
80
59
  slop (~> 3.4)
81
60
  rack (1.5.2)
82
- rake (10.1.0)
83
- rb-inotify (0.8.8)
61
+ rack-parser (0.6.0)
62
+ rack
63
+ rack-test (0.6.2)
64
+ rack (>= 1.0)
65
+ rake (10.1.1)
66
+ rb-fsevent (0.9.4)
67
+ rb-inotify (0.9.3)
84
68
  ffi (>= 0.5.0)
85
- rdoc (4.0.1)
86
- json (~> 1.4)
87
69
  rspec (2.14.1)
88
70
  rspec-core (~> 2.14.0)
89
71
  rspec-expectations (~> 2.14.0)
90
72
  rspec-mocks (~> 2.14.0)
91
- rspec-core (2.14.5)
92
- rspec-expectations (2.14.2)
73
+ rspec-core (2.14.8)
74
+ rspec-expectations (2.14.5)
93
75
  diff-lcs (>= 1.1.3, < 2.0)
94
- rspec-mocks (2.14.3)
95
- sass (3.2.10)
96
- simplecov (0.7.1)
97
- multi_json (~> 1.0)
98
- simplecov-html (~> 0.7.1)
99
- simplecov-html (0.7.1)
100
- slop (3.4.6)
101
- thin (1.5.1)
102
- daemons (>= 1.0.9)
103
- eventmachine (>= 0.12.6)
104
- rack (>= 1.0.0)
76
+ rspec-mocks (2.14.6)
77
+ sass (3.3.4)
78
+ slop (3.5.0)
105
79
  thor (0.18.1)
106
- tilt (1.4.1)
107
- treetop (1.4.15)
108
- polyglot
109
- polyglot (>= 0.3.1)
80
+ tilt (2.0.1)
81
+ timers (1.1.0)
110
82
 
111
83
  PLATFORMS
112
84
  ruby
113
85
 
114
86
  DEPENDENCIES
115
- bson_ext
116
- bundler
117
- coffee-script
118
87
  guard-rspec
119
- haml
120
- jeweler
121
- json
122
- mail
123
- mongo
124
- rack
125
- rb-inotify (~> 0.8.8)
126
- rdoc
88
+ ki!
89
+ rack-test
90
+ rake
127
91
  rspec
128
- sass
129
- simplecov
130
- thin
131
- thor
data/Guardfile CHANGED
@@ -1,7 +1,7 @@
1
1
  # A sample Guardfile
2
2
  # More info at https://github.com/guard/guard#readme
3
3
 
4
- guard 'rspec' do
4
+ guard :rspec do
5
5
  watch(%r{^spec/.+_spec\.rb$})
6
6
  watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
7
7
  watch('spec/spec_helper.rb') { "spec" }
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Cristian Mircea Messel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,63 @@
1
+ # Ki Framework
2
+
3
+ Tiny REST JSON ORM framework
4
+
5
+ * rvm
6
+ * mongodb
7
+ * haml
8
+ * sass
9
+ * coffee
10
+
11
+ ## Install
12
+
13
+ ```shell
14
+ gem install ki
15
+ ```
16
+
17
+ ## Getting started
18
+
19
+ ### Creating a new app
20
+
21
+ ```shell
22
+ ki new my-app
23
+ cd my-app
24
+ bundle
25
+ ```
26
+
27
+ This will create the folder *my-app* containing a bare bones ki application.
28
+
29
+ ```shell
30
+ rackup
31
+ ```
32
+
33
+ ### Adding a view
34
+
35
+ A view is a html page. By default, a view called 'index.haml' is created for
36
+ you in the 'views/' folder. All haml files from the '/views/' folder are
37
+ compiled to html at runtime.
38
+
39
+ For example, to serve a html file when a user accesses '/dashboard' create the
40
+ 'views/dashboard.haml' dashboard.
41
+
42
+ ### Adding assets
43
+
44
+ All files from the 'public/' folder are served to the client from the root url.
45
+
46
+ You can add any type of file. Coffee and sass files are compiled at runtime,
47
+ similar to haml.
48
+
49
+ ### View layout
50
+
51
+ TODO
52
+
53
+ ### Adding a resource
54
+
55
+ TODO
56
+
57
+ ### Restricting resource requests
58
+
59
+ TODO
60
+
61
+ ### Before/after filters
62
+
63
+ TODO
data/Rakefile CHANGED
@@ -1,48 +1,6 @@
1
- # encoding: utf-8
2
-
3
- require 'rubygems'
4
- require 'bundler'
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
10
- exit e.status_code
11
- end
12
- require 'rake'
13
-
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "ki"
18
- gem.homepage = "http://github.com/mess110/ki"
19
- gem.license = "MIT"
20
- gem.summary = %Q{Prototyping noSQL RESTful API cloud database}
21
- gem.description = %Q{Fuck setting up a database for your prototypes. Some call it an ORM with a RESTful interface. Some say its for prototyping.}
22
- gem.email = "mess110@gmail.com"
23
- gem.authors = ["Cristian Mircea Messel"]
24
- end
25
- Jeweler::RubygemsDotOrgTasks.new
26
-
27
- require 'rspec/core'
1
+ require 'bundler/gem_tasks'
28
2
  require 'rspec/core/rake_task'
29
- RSpec::Core::RakeTask.new(:spec) do |spec|
30
- spec.pattern = FileList['spec/**/*_spec.rb']
31
- end
32
3
 
33
- task :default => :spec
34
-
35
- require 'rdoc/task'
36
- Rake::RDocTask.new do |rdoc|
37
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
4
+ RSpec::Core::RakeTask.new(:spec)
38
5
 
39
- rdoc.rdoc_dir = 'rdoc'
40
- rdoc.title = "ki #{version}"
41
- rdoc.rdoc_files.include('README*')
42
- rdoc.rdoc_files.include('lib/extensions/*.rb')
43
- rdoc.rdoc_files.include('lib/modules/*.rb')
44
- rdoc.rdoc_files.include('lib/model.rb')
45
- rdoc.rdoc_files.include('lib/db.rb')
46
- rdoc.rdoc_files.include('lib/req.rb')
47
- rdoc.rdoc_files.include('lib/resp.rb')
48
- end
6
+ task :default => :spec
data/bin/ki CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
4
 
5
- require 'ki_cli'
5
+ require 'ki/ki_cli'
6
6
 
7
7
  KiCli.start(ARGV)
data/ki.gemspec CHANGED
@@ -1,142 +1,36 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'ki/version'
5
5
 
6
- Gem::Specification.new do |s|
7
- s.name = "ki"
8
- s.version = "0.3.3"
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "ki"
8
+ spec.version = Ki::VERSION
9
+ spec.authors = ["Cristian Mircea Messel"]
10
+ spec.email = ["mess110@gmail.com"]
11
+ spec.summary = %q{it said optional}
12
+ spec.description = %q{it said optional}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
9
15
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Cristian Mircea Messel"]
12
- s.date = "2013-09-02"
13
- s.description = "Fuck setting up a database for your prototypes. Some call it an ORM with a RESTful interface. Some say its for prototyping."
14
- s.email = "mess110@gmail.com"
15
- s.executables = ["ki"]
16
- s.extra_rdoc_files = [
17
- "LICENSE.txt",
18
- "README.rdoc"
19
- ]
20
- s.files = [
21
- ".document",
22
- ".rspec",
23
- ".rvmrc",
24
- "Gemfile",
25
- "Gemfile.lock",
26
- "Guardfile",
27
- "LICENSE.txt",
28
- "README.rdoc",
29
- "Rakefile",
30
- "VERSION",
31
- "bin/ki",
32
- "examples/base/Gemfile",
33
- "examples/base/Gemfile.lock",
34
- "examples/base/app.rb",
35
- "examples/base/config.ru",
36
- "examples/base/config.yml",
37
- "gfx/colors.xcf",
38
- "gfx/ki3.eps",
39
- "gfx/logo.png",
40
- "ki.gemspec",
41
- "ki_wrap.rb",
42
- "lib/conf.rb",
43
- "lib/db.rb",
44
- "lib/helpers.rb",
45
- "lib/ki.rb",
46
- "lib/ki_cli.rb",
47
- "lib/mockreq.rb",
48
- "lib/model.rb",
49
- "lib/modules/callbacks.rb",
50
- "lib/modules/email.rb",
51
- "lib/modules/model_helpers.rb",
52
- "lib/modules/query_interface.rb",
53
- "lib/modules/restrictions.rb",
54
- "lib/req.rb",
55
- "lib/resp.rb",
56
- "lib/static_file.rb",
57
- "lib/util.rb",
58
- "lib/views/404.haml",
59
- "lib/views/406.haml",
60
- "lib/views/index.haml",
61
- "lib/views/layout.haml",
62
- "spec/conf_spec.rb",
63
- "spec/db_spec.rb",
64
- "spec/integration/integration_spec.rb",
65
- "spec/ki_spec.rb",
66
- "spec/model_spec.rb",
67
- "spec/modules/callbacks_spec.rb",
68
- "spec/modules/email_spec.rb",
69
- "spec/modules/query_interface_spec.rb",
70
- "spec/modules/restrictions_spec.rb",
71
- "spec/performance/performance.sh",
72
- "spec/req_spec.rb",
73
- "spec/spec_helper.rb",
74
- "spec/util_spec.rb"
75
- ]
76
- s.homepage = "http://github.com/mess110/ki"
77
- s.licenses = ["MIT"]
78
- s.require_paths = ["lib"]
79
- s.rubygems_version = "1.8.23"
80
- s.summary = "Prototyping noSQL RESTful API cloud database"
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib", "examples"]
81
20
 
82
- if s.respond_to? :specification_version then
83
- s.specification_version = 3
21
+ spec.add_runtime_dependency "bundler", "~> 1.5"
22
+ spec.add_runtime_dependency "rack"
23
+ spec.add_runtime_dependency "rack-parser"
24
+ spec.add_runtime_dependency "thor"
25
+ spec.add_runtime_dependency "haml"
26
+ spec.add_runtime_dependency "sass"
27
+ spec.add_runtime_dependency "coffee-script"
28
+ spec.add_runtime_dependency "mongo"
29
+ spec.add_runtime_dependency "bson_ext"
84
30
 
85
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
86
- s.add_runtime_dependency(%q<rack>, [">= 0"])
87
- s.add_runtime_dependency(%q<mongo>, [">= 0"])
88
- s.add_runtime_dependency(%q<bson_ext>, [">= 0"])
89
- s.add_runtime_dependency(%q<thor>, [">= 0"])
90
- s.add_runtime_dependency(%q<haml>, [">= 0"])
91
- s.add_runtime_dependency(%q<sass>, [">= 0"])
92
- s.add_runtime_dependency(%q<coffee-script>, [">= 0"])
93
- s.add_runtime_dependency(%q<thin>, [">= 0"])
94
- s.add_runtime_dependency(%q<mail>, [">= 0"])
95
- s.add_runtime_dependency(%q<json>, [">= 0"])
96
- s.add_development_dependency(%q<rspec>, [">= 0"])
97
- s.add_development_dependency(%q<guard-rspec>, [">= 0"])
98
- s.add_development_dependency(%q<rb-inotify>, ["~> 0.8.8"])
99
- s.add_development_dependency(%q<rdoc>, [">= 0"])
100
- s.add_development_dependency(%q<bundler>, [">= 0"])
101
- s.add_development_dependency(%q<jeweler>, [">= 0"])
102
- s.add_development_dependency(%q<simplecov>, [">= 0"])
103
- else
104
- s.add_dependency(%q<rack>, [">= 0"])
105
- s.add_dependency(%q<mongo>, [">= 0"])
106
- s.add_dependency(%q<bson_ext>, [">= 0"])
107
- s.add_dependency(%q<thor>, [">= 0"])
108
- s.add_dependency(%q<haml>, [">= 0"])
109
- s.add_dependency(%q<sass>, [">= 0"])
110
- s.add_dependency(%q<coffee-script>, [">= 0"])
111
- s.add_dependency(%q<thin>, [">= 0"])
112
- s.add_dependency(%q<mail>, [">= 0"])
113
- s.add_dependency(%q<json>, [">= 0"])
114
- s.add_dependency(%q<rspec>, [">= 0"])
115
- s.add_dependency(%q<guard-rspec>, [">= 0"])
116
- s.add_dependency(%q<rb-inotify>, ["~> 0.8.8"])
117
- s.add_dependency(%q<rdoc>, [">= 0"])
118
- s.add_dependency(%q<bundler>, [">= 0"])
119
- s.add_dependency(%q<jeweler>, [">= 0"])
120
- s.add_dependency(%q<simplecov>, [">= 0"])
121
- end
122
- else
123
- s.add_dependency(%q<rack>, [">= 0"])
124
- s.add_dependency(%q<mongo>, [">= 0"])
125
- s.add_dependency(%q<bson_ext>, [">= 0"])
126
- s.add_dependency(%q<thor>, [">= 0"])
127
- s.add_dependency(%q<haml>, [">= 0"])
128
- s.add_dependency(%q<sass>, [">= 0"])
129
- s.add_dependency(%q<coffee-script>, [">= 0"])
130
- s.add_dependency(%q<thin>, [">= 0"])
131
- s.add_dependency(%q<mail>, [">= 0"])
132
- s.add_dependency(%q<json>, [">= 0"])
133
- s.add_dependency(%q<rspec>, [">= 0"])
134
- s.add_dependency(%q<guard-rspec>, [">= 0"])
135
- s.add_dependency(%q<rb-inotify>, ["~> 0.8.8"])
136
- s.add_dependency(%q<rdoc>, [">= 0"])
137
- s.add_dependency(%q<bundler>, [">= 0"])
138
- s.add_dependency(%q<jeweler>, [">= 0"])
139
- s.add_dependency(%q<simplecov>, [">= 0"])
140
- end
141
- end
142
31
 
32
+ spec.add_development_dependency "rake"
33
+ spec.add_development_dependency "rack-test"
34
+ spec.add_development_dependency "rspec"
35
+ spec.add_development_dependency "guard-rspec"
36
+ end