medea 0.2.2 → 0.2.3

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -8,7 +8,10 @@ module ClassLevelInheritableAttributes
8
8
 
9
9
  module ClassMethods
10
10
  def inheritable_attributes(*args)
11
- @inheritable_attributes ||= [:inheritable_attributes]
11
+ #for some reason, in rails, @inheritable_attributes is set to be an empty hash here...
12
+ #check for this strange case and account for it.
13
+ @inheritable_attributes = [:inheritable_attributes] if @inheritable_attributes == {} ||
14
+ @inheritable_attributes == nil
12
15
  @inheritable_attributes += args
13
16
  args.each do |arg|
14
17
  class_eval %(
data/lib/medea/jasondb.rb CHANGED
@@ -1,17 +1,20 @@
1
1
  module JasonDB
2
2
  #jason_url here doesn't include the http[s]:// part, but does include the domain and a trailing '/'
3
3
  #( so it's "rest.jasondb.com/<domain>/" )
4
- attr_accessor :jason_url, :user, :password
5
-
6
-
7
4
 
8
5
  def JasonDB::db_auth_url mode=:secure
9
- user = "michael"
10
- jason_url = "rest.jasondb.com/medea-test/"
11
- password = "password"
6
+ config = Rails.configuration.database_configuration[Rails.env]
7
+ user = config["user"]
8
+ topic = config["topic"]
9
+ password = config["password"]
10
+ if config["jason_host"]
11
+ host = config["jason_host"]
12
+ else
13
+ host = "rest.jasondb.com"
14
+ end
12
15
  protocol = "http"
13
16
  protocol << "s" if mode == :secure
14
- "#{protocol}://#{user}:#{password}@#{jason_url}"
17
+ "#{protocol}://#{user}:#{password}@#{host}/#{topic}/"
15
18
  end
16
19
 
17
- end
20
+ end
@@ -19,7 +19,7 @@ module Medea
19
19
  list[list_name] = [list_class, list_type]
20
20
  self.class_variable_set :@@lists, list
21
21
 
22
- define_method list_name, do
22
+ define_method(list_name) do
23
23
  #puts "Looking at the #{list_name.to_s} list, which is full of #{list_type.name}s"
24
24
  JasonListProperty.new self, list_name, list_class, list_type
25
25
  end
data/medea-0.2.2.gem ADDED
Binary file
data/medea.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{medea}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Jensen"]
12
- s.date = %q{2010-12-21}
12
+ s.date = %q{2010-12-22}
13
13
  s.description = %q{Simple wrapper for persisting objects to JasonDB}
14
14
  s.email = %q{michaelj@jasondb.com}
15
15
  s.extra_rdoc_files = [
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
28
28
  "lib/medea/jasondeferredquery.rb",
29
29
  "lib/medea/jasonlistproperty.rb",
30
30
  "lib/medea/jasonobject.rb",
31
- "medea-0.2.1.gem",
31
+ "medea-0.2.2.gem",
32
32
  "medea.gemspec"
33
33
  ]
34
34
  s.homepage = %q{https://github.com/rob-linton/Medea}
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Jensen
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-21 00:00:00 +11:00
17
+ date: 2010-12-22 00:00:00 +11:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -64,7 +64,7 @@ files:
64
64
  - lib/medea/jasondeferredquery.rb
65
65
  - lib/medea/jasonlistproperty.rb
66
66
  - lib/medea/jasonobject.rb
67
- - medea-0.2.1.gem
67
+ - medea-0.2.2.gem
68
68
  - medea.gemspec
69
69
  has_rdoc: true
70
70
  homepage: https://github.com/rob-linton/Medea
data/medea-0.2.1.gem DELETED
Binary file