globber 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad8798599cf2cb6067dcc4494aef52bad7fa22fe
4
- data.tar.gz: f843359e717f14ef4f2b9bb891f4a2762bf1da41
3
+ metadata.gz: 47e3d35cb668cfe8860aa27fab5964f148b0b3f8
4
+ data.tar.gz: c89b38934be807b831c4d3673ae637e0f9db1a3c
5
5
  SHA512:
6
- metadata.gz: 482ff8b34a237a7ce45985aa51d19293bc9928f6b6e0ac1f1b364fd12fb291c0e1a24af8e78a95c8a0ac4398a9073b0e41a7190bb6587d72eb32773f4d283ff7
7
- data.tar.gz: a4536029d6c1a6fa6eedbde999b4c504f9fa1a1ce986a550096d7bf9eb49d883ee9d66d843d21594bf597b7b7787a036ff9cd8bee28f62d8a8dae1ed4f247ba3
6
+ metadata.gz: fad1a2fa5a752ad9ba83df14c56be1bb8f6e3fec66dd5f888f3dbc863a47ba428e6b7a99108fe6d3a2331afeaf46db61c09710706fd3a93f768a7283a6367422
7
+ data.tar.gz: 2fa857e6af93c149e0a3129f596aded1b49416eeecad074412ab48e7a61aee94f633985369ab329728ff53932d302385fe871dc424b27ef94d0bd1503f273e0c
@@ -0,0 +1,26 @@
1
+ require 'rails/generators'
2
+
3
+ module Globber
4
+ class InstallGenerator < Rails::Generators::Base
5
+ desc "Setup application for use with Globber"
6
+
7
+ # Commandline options can be defined here using Thor-like options:
8
+ class_option :install, :type => :boolean, :default => false, :desc => "Install Globber"
9
+
10
+ # I can later access that option using:
11
+ # options[:my_opt]
12
+
13
+ def generate_initializer_file
14
+ create_file 'config/initializers/globber.rb', "Globber.configure do |config|\n config.base_uri = ''\nend"
15
+ end
16
+
17
+ def mount_engine
18
+ mount_line = 'mount Globber::Engine => "/"'
19
+ line = 'routes.draw do'
20
+ gsub_file 'config/routes.rb', /(#{Regexp.escape(line)})/mi do |match|
21
+ "#{match}\n #{mount_line}\n"
22
+ end
23
+ end
24
+
25
+ end
26
+ end
@@ -0,0 +1,3 @@
1
+ Globber.configure do |config|
2
+ config.base_uri = ''
3
+ end
@@ -1,3 +1,3 @@
1
1
  module Globber
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: globber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Peterson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-07 00:00:00.000000000 Z
11
+ date: 2015-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.3
19
+ version: '4.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 4.2.3
26
+ version: '4.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: virtus
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: httparty
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '0.13'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '0.13'
55
55
  description: ''
56
56
  email:
57
57
  - jsksma2@gmail.com
@@ -60,7 +60,6 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - MIT-LICENSE
63
- - README.rdoc
64
63
  - Rakefile
65
64
  - app/assets/javascripts/globber/application.js
66
65
  - app/assets/stylesheets/globber/application.css
@@ -73,6 +72,8 @@ files:
73
72
  - app/services/success.rb
74
73
  - app/views/layouts/globber/application.html.erb
75
74
  - config/routes.rb
75
+ - lib/generators/globber/install_generator.rb
76
+ - lib/generators/globber/templates/config/initializers/globber.rb
76
77
  - lib/globber.rb
77
78
  - lib/globber/configuration.rb
78
79
  - lib/globber/engine.rb
data/README.rdoc DELETED
@@ -1,24 +0,0 @@
1
- # Globber
2
- Utilize the ruby on rails environment backed by any api server!
3
-
4
- ## Installation
5
- In your `Gemfile`:
6
- ```ruby
7
- gem 'globber'
8
- ```
9
- In `config/routes.rb`:
10
- ```ruby
11
- mount Globber::Engine => "/"
12
- ```
13
- In `config/initializers/globber.rb`:
14
- ```ruby
15
- Globber.configure do |c|
16
- c.base_uri = 'http://api.yoursite.com'
17
- end
18
- ```
19
- ##### Now whichever route is passed to rails will be mapped to your API server.
20
- __E.g.__ http://localhost:3000/1/caliber/popular Becomes http://api.yoursite.com/1/caliber/popular
21
- And you receive your JSON data server-side.
22
-
23
- ## Author
24
- [@jakenberg](https://github.com/jakenberg)