ruby-echonest 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
File without changes
data/Rakefile CHANGED
@@ -1,109 +1,42 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
- require 'rake/clean'
4
- require 'rake/testtask'
5
- require 'rake/packagetask'
6
- require 'rake/gempackagetask'
7
- require 'rake/rdoctask'
8
- require 'rake/contrib/sshpublisher'
9
- require 'spec/rake/spectask'
10
- require 'fileutils'
11
- include FileUtils
12
3
 
13
- $LOAD_PATH.unshift "lib"
14
- require "echonest"
15
-
16
- NAME = "ruby-echonest"
17
- AUTHOR = "youpy"
18
- EMAIL = "youpy@buycheapviagraonlinenow.com"
19
- DESCRIPTION = "An Ruby interface for Echo Nest Developer API"
20
- RUBYFORGE_PROJECT = "ruby-echonest"
21
- HOMEPATH = "http://github.com/youpy/ruby-echonest"
22
- BIN_FILES = %w( )
23
- VERS = Echonest::VERSION
24
-
25
- REV = File.read(".svn/entries")[/committed-rev="(d+)"/, 1] rescue nil
26
- CLEAN.include ['**/.*.sw?', '*.gem', '.config']
27
- RDOC_OPTS = [
28
- '--title', "#{NAME} documentation",
29
- "--charset", "utf-8",
30
- "--opname", "index.html",
31
- "--line-numbers",
32
- "--main", "README.rdoc",
33
- "--inline-source",
34
- ]
35
-
36
- task :default => [:spec]
37
- task :package => [:clean]
38
-
39
- Spec::Rake::SpecTask.new do |t|
40
- t.spec_opts = ['--options', "spec/spec.opts"]
41
- t.spec_files = FileList['spec/*_spec.rb']
42
- t.rcov = true
43
- end
44
-
45
- spec = Gem::Specification.new do |s|
46
- s.name = NAME
47
- s.version = VERS
48
- s.platform = Gem::Platform::RUBY
49
- s.has_rdoc = true
50
- s.extra_rdoc_files = ["README.rdoc", "ChangeLog"]
51
- s.rdoc_options += RDOC_OPTS + ['--exclude', '^(examples|extras)/']
52
- s.summary = DESCRIPTION
53
- s.description = DESCRIPTION
54
- s.author = AUTHOR
55
- s.email = EMAIL
56
- s.homepage = HOMEPATH
57
- s.executables = BIN_FILES
58
- s.rubyforge_project = RUBYFORGE_PROJECT
59
- s.bindir = "bin"
60
- s.require_path = "lib"
61
- s.test_files = Dir["test/test_*.rb"]
62
-
63
- s.add_dependency('libxml-ruby')
64
- s.add_dependency('httpclient')
65
- s.add_dependency('hashie')
66
- #s.required_ruby_version = '>= 1.8.2'
67
-
68
- s.files = %w(README.rdoc ChangeLog Rakefile) +
69
- Dir.glob("{bin,doc,spec,test,lib,templates,generator,extras,website,script}/**/*") +
70
- Dir.glob("ext/**/*.{h,c,rb}") +
71
- Dir.glob("examples/**/*.rb") +
72
- Dir.glob("tools/*.rb")
73
-
74
- s.extensions = FileList["ext/**/extconf.rb"].to_a
4
+ begin
5
+ $LOAD_PATH.unshift "lib"
6
+ require 'echonest'
7
+ require 'jeweler'
8
+ Jeweler::Tasks.new do |gem|
9
+ gem.name = "ruby-echonest"
10
+ gem.version = Echonest::VERSION
11
+ gem.summary = "An Ruby interface for Echo Nest Developer API"
12
+ gem.description = "An Ruby interface for Echo Nest Developer API"
13
+ gem.email = "youpy@buycheapviagraonlinenow.com"
14
+ gem.homepage = "http://github.com/youpy/ruby-echonest"
15
+ gem.authors = ["youpy"]
16
+ gem.add_development_dependency "rspec", ">= 2.0.0"
17
+ gem.add_dependency "httpclient"
18
+ gem.add_dependency "hashie"
19
+ gem.add_dependency "libxml-ruby"
20
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
21
+ end
22
+ Jeweler::GemcutterTasks.new
23
+ rescue LoadError
24
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
75
25
  end
76
26
 
77
- Rake::GemPackageTask.new(spec) do |p|
78
- p.need_tar = true
79
- p.gem_spec = spec
80
- end
27
+ require 'rspec/core/rake_task'
81
28
 
82
- task :install do
83
- name = "#{NAME}-#{VERS}.gem"
84
- sh %{rake package}
85
- sh %{sudo gem install pkg/#{name}}
29
+ RSpec::Core::RakeTask.new(:core) do |spec|
30
+ spec.pattern = 'spec/**/*_spec.rb'
86
31
  end
87
32
 
88
- task :uninstall => [:clean] do
89
- sh %{sudo gem uninstall #{NAME}}
90
- end
33
+ task :core => :check_dependencies
34
+ task :default => :core
91
35
 
36
+ require 'rdoc/task'
92
37
  Rake::RDocTask.new do |rdoc|
93
- rdoc.rdoc_dir = 'html'
94
- rdoc.options += RDOC_OPTS
95
- rdoc.template = "resh"
96
- #rdoc.template = "#{ENV['template']}.rb" if ENV['template']
97
- if ENV['DOC_FILES']
98
- rdoc.rdoc_files.include(ENV['DOC_FILES'].split(/,\s*/))
99
- else
100
- rdoc.rdoc_files.include('README', 'ChangeLog')
101
- rdoc.rdoc_files.include('lib/**/*.rb')
102
- rdoc.rdoc_files.include('ext/**/*.c')
103
- end
104
- end
105
-
106
- desc "Show information about the gem"
107
- task :debug_gem do
108
- puts spec.to_ruby
38
+ rdoc.rdoc_dir = 'rdoc'
39
+ rdoc.title = "echonest %s" % Echonest::VERSION
40
+ rdoc.rdoc_files.include('README*')
41
+ rdoc.rdoc_files.include('lib/**/*.rb')
109
42
  end
@@ -8,7 +8,11 @@ module Echonest
8
8
  end
9
9
 
10
10
  def self.new_from_url(url)
11
- new(open(url).read)
11
+ if OpenURI::Options.has_key? :ssl_verify_mode
12
+ new(open(url, 'r', { :ssl_verify_mode => OpenSSL::SSL::VERIFY_NONE }).read)
13
+ else
14
+ new(open(url).read)
15
+ end
12
16
  end
13
17
 
14
18
  def tempo
@@ -1,3 +1,3 @@
1
1
  module Echonest
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
@@ -0,0 +1,39 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{ruby-echonest}
5
+ s.version = "0.1.0"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["youpy"]
9
+ s.date = %q{2010-08-24}
10
+ s.description = %q{An Ruby interface for Echo Nest Developer API}
11
+ s.email = %q{youpy@buycheapviagraonlinenow.com}
12
+ s.extra_rdoc_files = ["README.rdoc", "ChangeLog"]
13
+ s.files = ["README.rdoc", "ChangeLog", "Rakefile", "spec/analysis_spec.rb", "spec/api_spec.rb", "spec/echonest_spec.rb", "spec/fixtures", "spec/fixtures/analysis.json", "spec/fixtures/profile.json", "spec/fixtures/profile_failure.json", "spec/fixtures/profile_unknown.json", "spec/fixtures/sample.mp3", "spec/response_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "spec/track_spec.rb", "lib/echonest", "lib/echonest/analysis.rb", "lib/echonest/api.rb", "lib/echonest/element", "lib/echonest/element/bar.rb", "lib/echonest/element/beat.rb", "lib/echonest/element/loudness.rb", "lib/echonest/element/section.rb", "lib/echonest/element/segment.rb", "lib/echonest/element/tatum.rb", "lib/echonest/response.rb", "lib/echonest/traditional_api_methods.rb", "lib/echonest/version.rb", "lib/echonest.rb"]
14
+ s.homepage = %q{http://github.com/youpy/ruby-echonest}
15
+ s.rdoc_options = ["--title", "ruby-echonest documentation", "--charset", "utf-8", "--opname", "index.html", "--line-numbers", "--main", "README.rdoc", "--inline-source", "--exclude", "^(examples|extras)/"]
16
+ s.require_paths = ["lib"]
17
+ s.rubyforge_project = %q{ruby-echonest}
18
+ s.rubygems_version = %q{1.3.6}
19
+ s.summary = %q{An Ruby interface for Echo Nest Developer API}
20
+
21
+ if s.respond_to? :specification_version then
22
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
23
+ s.specification_version = 3
24
+
25
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
26
+ s.add_runtime_dependency(%q<libxml-ruby>, [">= 0"])
27
+ s.add_runtime_dependency(%q<httpclient>, [">= 0"])
28
+ s.add_runtime_dependency(%q<hashie>, [">= 0"])
29
+ else
30
+ s.add_dependency(%q<libxml-ruby>, [">= 0"])
31
+ s.add_dependency(%q<httpclient>, [">= 0"])
32
+ s.add_dependency(%q<hashie>, [">= 0"])
33
+ end
34
+ else
35
+ s.add_dependency(%q<libxml-ruby>, [">= 0"])
36
+ s.add_dependency(%q<httpclient>, [">= 0"])
37
+ s.add_dependency(%q<hashie>, [">= 0"])
38
+ end
39
+ end
@@ -2,8 +2,6 @@ $:.unshift File.dirname(__FILE__)
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- include SpecHelper
6
-
7
5
  describe Echonest::Analysis do
8
6
  before do
9
7
  @analysis = Echonest::Analysis.new(open(fixture('analysis.json')).read)
data/spec/api_spec.rb CHANGED
@@ -1,9 +1,6 @@
1
1
  $:.unshift File.dirname(__FILE__)
2
2
 
3
3
  require 'spec_helper'
4
- require "echonest"
5
-
6
- include SpecHelper
7
4
 
8
5
  describe Echonest::Api do
9
6
  before do
@@ -1,9 +1,6 @@
1
1
  $:.unshift File.dirname(__FILE__)
2
2
 
3
3
  require 'spec_helper'
4
- require "echonest"
5
-
6
- include SpecHelper
7
4
 
8
5
  describe Echonest do
9
6
  it "should return an instance of Echonest::Api" do
@@ -2,8 +2,6 @@ $:.unshift File.dirname(__FILE__)
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- include SpecHelper
6
-
7
5
  describe Echonest::Response do
8
6
  before do
9
7
  @success = Echonest::Response.new(open(fixture('profile.json')).read)
data/spec/spec_helper.rb CHANGED
@@ -2,10 +2,8 @@ $:.unshift File.dirname(__FILE__) + '/../lib/'
2
2
 
3
3
  require 'echonest'
4
4
 
5
- module SpecHelper
5
+ RSpec.configure do |config|
6
6
  def fixture(filename)
7
7
  File.dirname(__FILE__) + '/fixtures/' + filename
8
8
  end
9
9
  end
10
-
11
-
data/spec/track_spec.rb CHANGED
@@ -1,9 +1,6 @@
1
1
  $:.unshift File.dirname(__FILE__)
2
2
 
3
3
  require 'spec_helper'
4
- require "echonest"
5
-
6
- include SpecHelper
7
4
 
8
5
  describe Echonest::ApiMethods::Track do
9
6
  before do
metadata CHANGED
@@ -1,83 +1,73 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ruby-echonest
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 1
9
- version: 0.1.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - youpy
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2010-10-30 00:00:00 +09:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: libxml-ruby
12
+ date: 2011-11-07 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: &70182523091860 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 2.0.0
22
+ type: :development
22
23
  prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- version: "0"
30
- type: :runtime
31
- version_requirements: *id001
32
- - !ruby/object:Gem::Dependency
24
+ version_requirements: *70182523091860
25
+ - !ruby/object:Gem::Dependency
33
26
  name: httpclient
34
- prerelease: false
35
- requirement: &id002 !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- segments:
40
- - 0
41
- version: "0"
27
+ requirement: &70182523106840 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
42
33
  type: :runtime
43
- version_requirements: *id002
44
- - !ruby/object:Gem::Dependency
34
+ prerelease: false
35
+ version_requirements: *70182523106840
36
+ - !ruby/object:Gem::Dependency
45
37
  name: hashie
38
+ requirement: &70182523106220 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
46
45
  prerelease: false
47
- requirement: &id003 !ruby/object:Gem::Requirement
48
- requirements:
49
- - - ">="
50
- - !ruby/object:Gem::Version
51
- segments:
52
- - 0
53
- version: "0"
46
+ version_requirements: *70182523106220
47
+ - !ruby/object:Gem::Dependency
48
+ name: libxml-ruby
49
+ requirement: &70182523105580 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
54
55
  type: :runtime
55
- version_requirements: *id003
56
+ prerelease: false
57
+ version_requirements: *70182523105580
56
58
  description: An Ruby interface for Echo Nest Developer API
57
59
  email: youpy@buycheapviagraonlinenow.com
58
60
  executables: []
59
-
60
61
  extensions: []
61
-
62
- extra_rdoc_files:
63
- - README.rdoc
62
+ extra_rdoc_files:
64
63
  - ChangeLog
65
- files:
66
64
  - README.rdoc
65
+ files:
66
+ - .rspec
67
67
  - ChangeLog
68
+ - README.rdoc
68
69
  - Rakefile
69
- - spec/analysis_spec.rb
70
- - spec/api_spec.rb
71
- - spec/echonest_spec.rb
72
- - spec/fixtures/analysis.json
73
- - spec/fixtures/profile.json
74
- - spec/fixtures/profile_failure.json
75
- - spec/fixtures/profile_unknown.json
76
- - spec/fixtures/sample.mp3
77
- - spec/response_spec.rb
78
- - spec/spec.opts
79
- - spec/spec_helper.rb
80
- - spec/track_spec.rb
70
+ - lib/echonest.rb
81
71
  - lib/echonest/analysis.rb
82
72
  - lib/echonest/api.rb
83
73
  - lib/echonest/element/bar.rb
@@ -89,47 +79,40 @@ files:
89
79
  - lib/echonest/response.rb
90
80
  - lib/echonest/traditional_api_methods.rb
91
81
  - lib/echonest/version.rb
92
- - lib/echonest.rb
93
- has_rdoc: true
82
+ - ruby-echonest.gemspec
83
+ - spec/analysis_spec.rb
84
+ - spec/api_spec.rb
85
+ - spec/echonest_spec.rb
86
+ - spec/fixtures/analysis.json
87
+ - spec/fixtures/profile.json
88
+ - spec/fixtures/profile_failure.json
89
+ - spec/fixtures/profile_unknown.json
90
+ - spec/fixtures/sample.mp3
91
+ - spec/response_spec.rb
92
+ - spec/spec_helper.rb
93
+ - spec/track_spec.rb
94
94
  homepage: http://github.com/youpy/ruby-echonest
95
95
  licenses: []
96
-
97
96
  post_install_message:
98
- rdoc_options:
99
- - --title
100
- - ruby-echonest documentation
101
- - --charset
102
- - utf-8
103
- - --opname
104
- - index.html
105
- - --line-numbers
106
- - --main
107
- - README.rdoc
108
- - --inline-source
109
- - --exclude
110
- - ^(examples|extras)/
111
- require_paths:
97
+ rdoc_options: []
98
+ require_paths:
112
99
  - lib
113
- required_ruby_version: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- segments:
118
- - 0
119
- version: "0"
120
- required_rubygems_version: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- segments:
125
- - 0
126
- version: "0"
100
+ required_ruby_version: !ruby/object:Gem::Requirement
101
+ none: false
102
+ requirements:
103
+ - - ! '>='
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
127
112
  requirements: []
128
-
129
- rubyforge_project: ruby-echonest
130
- rubygems_version: 1.3.6
113
+ rubyforge_project:
114
+ rubygems_version: 1.8.10
131
115
  signing_key:
132
116
  specification_version: 3
133
117
  summary: An Ruby interface for Echo Nest Developer API
134
118
  test_files: []
135
-