meetup_client 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,7 +1,6 @@
1
- #!/usr/bin/env rake
2
- # Add your own tasks in files placed in lib/tasks ending in .rake,
3
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
4
3
 
5
- require File.expand_path('../config/application', __FILE__)
6
-
7
- MeetupApiGem::Application.load_tasks
4
+ require 'rspec/core/rake_task'
5
+ RSpec::Core::RakeTask.new(:spec)
6
+ task :default => :spec
data/lib/meetup_api.rb CHANGED
@@ -5,7 +5,8 @@ class MeetupApi
5
5
  BASE_URL = 'http://api.meetup.com/2/'
6
6
 
7
7
  def method_request(method, params)
8
- json_request = ApiCallers::JsonRequest.new("#{BASE_URL}#{method}?#{query_string(params.merge( { key: MeetupClient.config.api_key } ))}")
8
+ params = params.merge( { key: ::MeetupClient.config.api_key } )
9
+ json_request = ApiCallers::JsonRequest.new("#{BASE_URL}#{method}?#{query_string(params)}")
9
10
  requester = ApiCallers::HttpRequester.new(json_request)
10
11
  requester.execute_request
11
12
  end
@@ -17,6 +18,6 @@ class MeetupApi
17
18
  private
18
19
 
19
20
  def query_string(params)
20
- params.map { |k,v| "#{k}=#{v}" }.join("&")
21
+ params.map { |k,v| "#{k}=#{v}" }.join("&")
21
22
  end
22
23
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.files = %w(README.md Rakefile meetup_client.gemspec)
13
13
  s.files += Dir.glob("lib/**/*.rb")
14
14
  s.files += Dir.glob("spec/**/*")
15
- s.version = '0.0.5'
15
+ s.version = '0.0.6'
16
16
  s.homepage = 'https://rubygems.org/gems/meetup_client'
17
17
  s.license = 'MIT'
18
18
  end
data/spec/spec_helper.rb CHANGED
@@ -1,38 +1,43 @@
1
1
  # This file is copied to spec/ when you run 'rails generate rspec:install'
2
- ENV["RAILS_ENV"] ||= 'test'
3
- require File.expand_path("../../config/environment", __FILE__)
4
- require 'rspec/rails'
5
- require 'rspec/autorun'
6
-
2
+ #ENV["RAILS_ENV"] ||= 'test'
3
+ #require File.expand_path("../../config/environment", __FILE__)
4
+ require 'rspec'
5
+ require 'api_callers/http_request'
6
+ require 'api_callers/json_request'
7
+ require 'meetup_api'
8
+ require 'meetup_client'
9
+ require 'net/http'
10
+ require 'active_support'
11
+ require 'action_controller'
7
12
  # Requires supporting ruby files with custom matchers and macros, etc,
8
13
  # in spec/support/ and its subdirectories.
9
- Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
10
-
11
- RSpec.configure do |config|
12
- # ## Mock Framework
13
- #
14
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
15
- #
16
- # config.mock_with :mocha
17
- # config.mock_with :flexmock
18
- # config.mock_with :rr
19
-
20
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
21
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
22
-
23
- # If you're not using ActiveRecord, or you'd prefer not to run each of your
24
- # examples within a transaction, remove the following line or assign false
25
- # instead of true.
26
- config.use_transactional_fixtures = true
27
-
28
- # If true, the base class of anonymous controllers will be inferred
29
- # automatically. This will be the default behavior in future versions of
30
- # rspec-rails.
31
- config.infer_base_class_for_anonymous_controllers = false
14
+ #Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
32
15
 
33
- # Run specs in random order to surface order dependencies. If you find an
34
- # order dependency and want to debug it, you can fix the order by providing
35
- # the seed, which is printed after each run.
36
- # --seed 1234
37
- config.order = "random"
38
- end
16
+ #RSpec.configure do |config|
17
+ # # ## Mock Framework
18
+ # #
19
+ # # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
20
+ # #
21
+ # # config.mock_with :mocha
22
+ # # config.mock_with :flexmock
23
+ # # config.mock_with :rr
24
+ #
25
+ # # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
26
+ # config.fixture_path = "#{::Rails.root}/spec/fixtures"
27
+ #
28
+ # # If you're not using ActiveRecord, or you'd prefer not to run each of your
29
+ # # examples within a transaction, remove the following line or assign false
30
+ # # instead of true.
31
+ # config.use_transactional_fixtures = true
32
+ #
33
+ # # If true, the base class of anonymous controllers will be inferred
34
+ # # automatically. This will be the default behavior in future versions of
35
+ # # rspec-rails.
36
+ # config.infer_base_class_for_anonymous_controllers = false
37
+ #
38
+ # # Run specs in random order to surface order dependencies. If you find an
39
+ # # order dependency and want to debug it, you can fix the order by providing
40
+ # # the seed, which is printed after each run.
41
+ # # --seed 1234
42
+ # config.order = "random"
43
+ #end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meetup_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: