lookup 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_DISABLE_SHARED_GEMS: "1"
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  pkg
2
2
  doc
3
3
  *.swp
4
+ *.rbc
data/Gemfile CHANGED
@@ -1,10 +1,10 @@
1
- source 'http://rubygems.org'
2
- gem 'activerecord', :require => "active_record"
3
- gem 'nokogiri'
4
- gem 'find_by_hash'
5
- gem 'sqlite3-ruby'
1
+ source :gemcutter
6
2
 
7
3
  group :test do
8
4
  gem 'rspec', '~> 2.0.0.beta.20'
9
5
  gem 'webmock'
10
6
  end
7
+
8
+ # Specify your gem's dependencies in lookup.gemspec
9
+ gemspec
10
+
@@ -1,3 +1,12 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ lookup (1.1.0)
5
+ activerecord (>= 2.3.8)
6
+ nokogiri
7
+ sqlite3-ruby (>= 1.2.5)
8
+ webmock
9
+
1
10
  GEM
2
11
  remote: http://rubygems.org/
3
12
  specs:
@@ -17,8 +26,6 @@ GEM
17
26
  builder (2.1.2)
18
27
  crack (0.1.8)
19
28
  diff-lcs (1.1.2)
20
- find_by_hash (0.0.1)
21
- activerecord
22
29
  i18n (0.4.1)
23
30
  nokogiri (1.4.3.1)
24
31
  rspec (2.0.0.beta.22)
@@ -41,9 +48,10 @@ PLATFORMS
41
48
  ruby
42
49
 
43
50
  DEPENDENCIES
44
- activerecord
45
- find_by_hash
51
+ activerecord (>= 2.3.8)
52
+ bundler (>= 1.0.0)
53
+ lookup!
46
54
  nokogiri
47
55
  rspec (~> 2.0.0.beta.20)
48
- sqlite3-ruby
56
+ sqlite3-ruby (>= 1.2.5)
49
57
  webmock
@@ -18,4 +18,3 @@ apis:
18
18
  1.9:
19
19
  name: Ruby 1.9
20
20
  url: "http://ruby-doc.org/ruby-1.9"
21
-
@@ -1,14 +1,11 @@
1
- require 'rubygems'
2
1
  require 'net/http'
2
+ require 'fileutils'
3
+
4
+ require 'active_record'
3
5
 
4
- gemfile = File.expand_path('../../Gemfile', __FILE__)
5
- require 'bundler'
6
- ENV['BUNDLE_GEMFILE'] = gemfile
7
- Bundler.require(:default)
8
6
 
9
7
  # Because some of you don't have ActiveSupport 3.0
10
8
  # And I'm too lazy to require all the shit for 2.3.8 just for this.
11
-
12
9
  class Hash
13
10
  def stringify_keys!
14
11
  keys.each do |key|
@@ -19,7 +16,6 @@ class Hash
19
16
  end
20
17
 
21
18
  module Lookup
22
- VERSION = "1.0.0"
23
19
  APIS = []
24
20
 
25
21
  class APINotFound < StandardError; end
@@ -39,6 +35,11 @@ module Lookup
39
35
  end
40
36
 
41
37
  def update!
38
+ FileUtils.mkdir_p(home)
39
+ if !File.exists?(home + "config")
40
+ FileUtils.cp(File.dirname(__FILE__) + "/../config/lookup", home + "config")
41
+ end
42
+
42
43
  puts "Updating API, this may take a minute or two. Please be patient!"
43
44
  [Constant, Entry, Api].map { |klass| klass.delete_all }
44
45
  puts "Updating #{apis.size} APIs."
@@ -191,4 +192,4 @@ module Lookup
191
192
  end
192
193
  end
193
194
 
194
- require File.join(File.dirname(__FILE__), 'models')
195
+ require 'lookup/models'
File without changes
@@ -0,0 +1,3 @@
1
+ module Lookup
2
+ VERSION = "1.1.0"
3
+ end
@@ -1,23 +1,17 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
1
  # -*- encoding: utf-8 -*-
5
-
6
- # -*- encoding: utf-8 -*-
7
- require File.expand_path("../lib/lookup", __FILE__)
2
+ require File.expand_path("../lib/lookup/version", __FILE__)
8
3
 
9
4
  Gem::Specification.new do |s|
10
5
  s.name = "lookup"
11
6
  s.version = Lookup::VERSION
12
7
  s.platform = Gem::Platform::RUBY
13
- s.authors = ["Ryan Bigg"]
14
- s.email = ["radarlistener@gmail.com"]
8
+ s.authors = []
9
+ s.email = []
15
10
  s.homepage = "http://rubygems.org/gems/lookup"
16
- s.summary = "A gem that provides a lazy man's ri"
17
- s.description = "A gem that provides a lazy man's ri"
11
+ s.summary = "Lazy man's RI"
12
+ s.description = "Lazy man's RI"
18
13
 
19
14
  s.required_rubygems_version = ">= 1.3.6"
20
- s.rubyforge_project = "lookup"
21
15
 
22
16
  s.add_development_dependency "bundler", ">= 1.0.0"
23
17
 
@@ -18,4 +18,3 @@ apis:
18
18
  1.9:
19
19
  name: Ruby 1.9
20
20
  url: "http://ruby-doc.org/ruby-1.9"
21
-
Binary file
@@ -18,4 +18,3 @@ apis:
18
18
  1.9:
19
19
  name: Ruby 1.9
20
20
  url: "http://ruby-doc.org/ruby-1.9"
21
-
@@ -1,9 +1,9 @@
1
1
  require File.dirname(__FILE__) + '/spec_helper'
2
2
 
3
3
  describe "Lookup" do
4
- #before(:all) do
5
- # Lookup.update!
6
- #end
4
+ before(:all) do
5
+ Lookup.update!
6
+ end
7
7
 
8
8
  def find_api(name)
9
9
  Lookup::Api.find_by_name(name)
metadata CHANGED
@@ -1,28 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lookup
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
+ - 1
8
9
  - 0
9
- - 0
10
- version: 1.0.0
10
+ version: 1.1.0
11
11
  platform: ruby
12
- authors:
13
- - Ryan Bigg
12
+ authors: []
13
+
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-22 00:00:00 -04:00
18
+ date: 2010-10-02 00:00:00 +10:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: bundler
23
- type: :development
24
23
  prerelease: false
25
- version_requirements: &id001 !ruby/object:Gem::Requirement
24
+ requirement: &id001 !ruby/object:Gem::Requirement
26
25
  none: false
27
26
  requirements:
28
27
  - - ">="
@@ -33,12 +32,12 @@ dependencies:
33
32
  - 0
34
33
  - 0
35
34
  version: 1.0.0
36
- requirement: *id001
35
+ type: :development
36
+ version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: sqlite3-ruby
39
- type: :runtime
40
39
  prerelease: false
41
- version_requirements: &id002 !ruby/object:Gem::Requirement
40
+ requirement: &id002 !ruby/object:Gem::Requirement
42
41
  none: false
43
42
  requirements:
44
43
  - - ">="
@@ -49,12 +48,12 @@ dependencies:
49
48
  - 2
50
49
  - 5
51
50
  version: 1.2.5
52
- requirement: *id002
51
+ type: :runtime
52
+ version_requirements: *id002
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: nokogiri
55
- type: :runtime
56
55
  prerelease: false
57
- version_requirements: &id003 !ruby/object:Gem::Requirement
56
+ requirement: &id003 !ruby/object:Gem::Requirement
58
57
  none: false
59
58
  requirements:
60
59
  - - ">="
@@ -63,12 +62,12 @@ dependencies:
63
62
  segments:
64
63
  - 0
65
64
  version: "0"
66
- requirement: *id003
65
+ type: :runtime
66
+ version_requirements: *id003
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: activerecord
69
- type: :runtime
70
69
  prerelease: false
71
- version_requirements: &id004 !ruby/object:Gem::Requirement
70
+ requirement: &id004 !ruby/object:Gem::Requirement
72
71
  none: false
73
72
  requirements:
74
73
  - - ">="
@@ -79,12 +78,12 @@ dependencies:
79
78
  - 3
80
79
  - 8
81
80
  version: 2.3.8
82
- requirement: *id004
81
+ type: :runtime
82
+ version_requirements: *id004
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: webmock
85
- type: :runtime
86
85
  prerelease: false
87
- version_requirements: &id005 !ruby/object:Gem::Requirement
86
+ requirement: &id005 !ruby/object:Gem::Requirement
88
87
  none: false
89
88
  requirements:
90
89
  - - ">="
@@ -93,10 +92,11 @@ dependencies:
93
92
  segments:
94
93
  - 0
95
94
  version: "0"
96
- requirement: *id005
97
- description: A gem that provides a lazy man's ri
98
- email:
99
- - radarlistener@gmail.com
95
+ type: :runtime
96
+ version_requirements: *id005
97
+ description: Lazy man's RI
98
+ email: []
99
+
100
100
  executables:
101
101
  - lookup
102
102
  extensions: []
@@ -104,20 +104,21 @@ extensions: []
104
104
  extra_rdoc_files: []
105
105
 
106
106
  files:
107
+ - .bundle/config
107
108
  - .gitignore
108
109
  - Gemfile
109
110
  - Gemfile.lock
110
111
  - LICENSE
111
112
  - README.md
112
113
  - Rakefile
114
+ - Rakefile.compiled.rbc
113
115
  - bin/lookup
114
116
  - config/lookup
115
- - install.rb
117
+ - lib/lib/lookup.sqlite3
116
118
  - lib/lookup.rb
117
- - lib/lookup.sqlite3
118
- - lib/models.rb
119
+ - lib/lookup/models.rb
120
+ - lib/lookup/version.rb
119
121
  - lookup.gemspec
120
- - postinstall.rb
121
122
  - spec/.lookup/config
122
123
  - spec/.lookup/lookup.sqlite3
123
124
  - spec/apis/1.8/classes.html
@@ -165,10 +166,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
166
  version: 1.3.6
166
167
  requirements: []
167
168
 
168
- rubyforge_project: lookup
169
+ rubyforge_project:
169
170
  rubygems_version: 1.3.7
170
171
  signing_key:
171
172
  specification_version: 3
172
- summary: A gem that provides a lazy man's ri
173
+ summary: Lazy man's RI
173
174
  test_files: []
174
175
 
data/install.rb DELETED
@@ -1,2 +0,0 @@
1
- `sudo cp lookup.rb /usr/bin/lookup`
2
- `sudo chmod +x /usr/bin/lookup`
@@ -1,5 +0,0 @@
1
- require 'fileutils'
2
- require 'pathname'
3
- lookup = Pathname.new(ENV["HOME"]) + ".lookup"
4
- FileUtils.mkdir_p(lookup)
5
- FileUtils.cp(File.dirname(__FILE__) + "/config/lookup", lookup + "config")