zemanta_client 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -62,3 +62,8 @@ And you will be returned Markup object or error will be raised if Zemanta return
62
62
  3. Commit your changes (`git commit -am 'Add some feature'`)
63
63
  4. Push to the branch (`git push origin my-new-feature`)
64
64
  5. Create new Pull Request
65
+
66
+ ## Changelog
67
+
68
+ 0.0.2 - Got rid of autoloads.
69
+ 0.0.1 - Initial release. Support for suggest_markup method and caching.
data/lib/zemanta/cache.rb CHANGED
@@ -1,7 +1,4 @@
1
1
  class Zemanta
2
2
  module Cache
3
- extend ActiveSupport::Autoload
4
-
5
- autoload :Disk
6
3
  end
7
4
  end
@@ -1,9 +1,5 @@
1
1
  class Zemanta
2
2
  class Configuration
3
- extend ActiveSupport::Autoload
4
-
5
- autoload :NullStorage
6
-
7
3
  attr_accessor :custom_request_opts, :format, :api_key, :cache_storage
8
4
 
9
5
  def initialize
@@ -1,12 +1,6 @@
1
1
  class Zemanta
2
2
  class Fetcher
3
3
  class Cache
4
- extend ActiveSupport::Autoload
5
-
6
- autoload :NullResponse
7
- autoload :Response
8
- autoload :Key
9
-
10
4
  def initialize(opts = {})
11
5
  @key = Key.new(opts).to_s
12
6
  end
@@ -1,10 +1,5 @@
1
1
  class Zemanta
2
2
  class Fetcher
3
- extend ActiveSupport::Autoload
4
-
5
- autoload :Cache
6
- autoload :Web
7
-
8
3
  def initialize(opts = {})
9
4
  @opts = opts
10
5
  end
@@ -1,10 +1,6 @@
1
1
  class Zemanta
2
2
  class Markup
3
3
  class Link
4
- extend ActiveSupport::Autoload
5
-
6
- autoload :Target
7
-
8
4
  attr_reader :relevance, :confidence, :entity_type, :target, :anchor
9
5
 
10
6
  def initialize(opts = {})
@@ -1,9 +1,5 @@
1
1
  class Zemanta
2
2
  class Markup
3
- extend ActiveSupport::Autoload
4
-
5
- autoload :Link
6
-
7
3
  attr_reader :text, :links
8
4
 
9
5
  def initialize(opts = {})
@@ -1,3 +1,3 @@
1
1
  class Zemanta
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/zemanta.rb CHANGED
@@ -1,16 +1,22 @@
1
- require 'active_support/dependencies/autoload'
2
1
  require 'typhoeus'
3
2
  require 'json'
4
3
  require 'digest/md5'
5
4
 
6
- class Zemanta
7
- extend ActiveSupport::Autoload
8
-
9
- autoload :Cache
10
- autoload :Configuration
11
- autoload :Fetcher
12
- autoload :Markup
5
+ require 'zemanta/cache'
6
+ require 'zemanta/cache/disk'
7
+ require 'zemanta/configuration'
8
+ require 'zemanta/configuration/null_storage'
9
+ require 'zemanta/fetcher'
10
+ require 'zemanta/fetcher/web'
11
+ require 'zemanta/fetcher/cache'
12
+ require 'zemanta/fetcher/cache/null_response'
13
+ require 'zemanta/fetcher/cache/response'
14
+ require 'zemanta/fetcher/cache/key'
15
+ require 'zemanta/markup'
16
+ require "zemanta/markup/link"
17
+ require 'zemanta/markup/link/target'
13
18
 
19
+ class Zemanta
14
20
  def initialize(text)
15
21
  @text = text
16
22
  end
data/zemanta.gemspec CHANGED
@@ -18,7 +18,6 @@ Gem::Specification.new do |gem|
18
18
  gem.require_paths = ["lib"]
19
19
 
20
20
  gem.add_dependency "typhoeus"
21
- gem.add_dependency "activesupport"
22
21
 
23
22
  gem.add_development_dependency "rspec"
24
23
  gem.add_development_dependency "webmock"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zemanta_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-08 00:00:00.000000000 Z
12
+ date: 2013-04-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: typhoeus
@@ -27,22 +27,6 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
- - !ruby/object:Gem::Dependency
31
- name: activesupport
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :runtime
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
30
  - !ruby/object:Gem::Dependency
47
31
  name: rspec
48
32
  requirement: !ruby/object:Gem::Requirement