event_finda_ruby 0.2.8 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c639de586ac86c251e200afb646295b54e423c58
4
- data.tar.gz: dd7f50fe97fb8580b2bd790b9188f14426c56019
3
+ metadata.gz: d4bd3289cfca753e357549af9de406a2f1d4907c
4
+ data.tar.gz: 798cc2e7aa4734c5d39f84b110646a328071bb26
5
5
  SHA512:
6
- metadata.gz: 61dce12c60eae9e881aa217e6f7ff936b51f4bf158b5c54955c94e0db858b60ef3d5088cc560a8ba259b029981748de70d4b67e427876e3b411f45c575028fd1
7
- data.tar.gz: 52952adc27ce5af17bbe5cca20fa00bf2f901e9e724b6d3bccf1719d2d1717c4fee33a848cabdf37d26e587585f4d161fdae34e5e3fe3a4b39477ec50f56f333
6
+ metadata.gz: 83fc5a1c600fa799ea022d9c825205cc9963ce37e5feaacd22e74eebc46c9ab122fdce52d4c340496166a01211bb0e8bbaa11d2ec1f3588e5bd14be117fa3879
7
+ data.tar.gz: 015adec09ce7234bb658c7901c91a537f00fe05679f456cc8d1e4aaa57ffa569e5e2a799b5d257a7e9f5cce2babebbb7ec726350ab89600b3ee668d383708575
@@ -7,12 +7,10 @@ class Base
7
7
  RESOURCE_SLUG = "base"
8
8
 
9
9
  attr_reader :api_extension
10
- attr_reader :auth
11
10
  attr_reader :filters
12
11
 
13
- def initialize(auth)
12
+ def initialize
14
13
  @api_extension = "json"
15
- @auth = auth
16
14
  @filters = { "rows" => "20" }
17
15
  end
18
16
 
@@ -62,6 +60,13 @@ class Base
62
60
  filters[filter_name] = value
63
61
  end
64
62
 
63
+ def auth
64
+ {
65
+ username: EventFindaRuby.configuration.username,
66
+ password: EventFindaRuby.configuration.password
67
+ }
68
+ end
69
+
65
70
  def get_filters
66
71
  filters.map { |k,v| "#{k}=#{v}" }.join("&")
67
72
  end
@@ -0,0 +1,12 @@
1
+ module EventFindaRuby
2
+ class Configuration
3
+
4
+ attr_accessor :username
5
+ attr_accessor :password
6
+
7
+ def initialize
8
+ @username = "default_username"
9
+ @password = "default_password"
10
+ end
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
1
  module EventFindaRuby
2
- VERSION = "0.2.8"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -2,5 +2,20 @@ require "event_finda_ruby/version"
2
2
  require "event_finda_ruby/base"
3
3
  require "event_finda_ruby/artists"
4
4
  require "event_finda_ruby/categories"
5
+ require "event_finda_ruby/configuration"
5
6
  require "event_finda_ruby/events"
6
7
  require "event_finda_ruby/locations"
8
+
9
+ module EventFindaRuby
10
+
11
+ class << self
12
+ attr_accessor :configuration
13
+ end
14
+
15
+ def self.configure
16
+ self.configuration ||= Configuration.new
17
+
18
+ yield(configuration)
19
+ end
20
+
21
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: event_finda_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Roldan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-10 00:00:00.000000000 Z
11
+ date: 2016-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -62,6 +62,7 @@ files:
62
62
  - lib/event_finda_ruby/artists.rb
63
63
  - lib/event_finda_ruby/base.rb
64
64
  - lib/event_finda_ruby/categories.rb
65
+ - lib/event_finda_ruby/configuration.rb
65
66
  - lib/event_finda_ruby/events.rb
66
67
  - lib/event_finda_ruby/locations.rb
67
68
  - lib/event_finda_ruby/version.rb
@@ -88,5 +89,5 @@ rubyforge_project:
88
89
  rubygems_version: 2.2.2
89
90
  signing_key:
90
91
  specification_version: 4
91
- summary: Eventfinda Ruby
92
+ summary: EventFinda Ruby
92
93
  test_files: []