maxcrm 0.1.1 → 0.2.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.
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = maxcrm
2
2
 
3
- Gem to work with maxcrm3.heroku.com. Requires Rails 3.
3
+ Gem to work with maxcrm3.heroku.com.
4
4
 
5
5
  1. gem "maxcrm" in Gemfile
6
6
  2. setup maxcrm.yml or heroku env (see below)
data/Rakefile CHANGED
@@ -22,22 +22,6 @@ rescue LoadError
22
22
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
23
23
  end
24
24
 
25
- require 'spec/rake/spectask'
26
- Spec::Rake::SpecTask.new(:spec) do |spec|
27
- spec.libs << 'lib' << 'spec'
28
- spec.spec_files = FileList['spec/**/*_spec.rb']
29
- end
30
-
31
- Spec::Rake::SpecTask.new(:rcov) do |spec|
32
- spec.libs << 'lib' << 'spec'
33
- spec.pattern = 'spec/**/*_spec.rb'
34
- spec.rcov = true
35
- end
36
-
37
- task :spec => :check_dependencies
38
-
39
- task :default => :spec
40
-
41
25
  require 'rake/rdoctask'
42
26
  Rake::RDocTask.new do |rdoc|
43
27
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.2.0
data/lib/configuration.rb CHANGED
@@ -16,7 +16,7 @@ module Maxcrm
16
16
  end
17
17
 
18
18
  def load_configuration_from_yml
19
- if File.exist?(filename = Rails.root.join("config", "maxcrm.yml"))
19
+ if defined?(Rails) and File.exist?(filename = Rails.root.join("config", "maxcrm.yml"))
20
20
  Maxcrm.config = YAML::load_file(filename)[Rails.env]
21
21
  return true
22
22
  end
@@ -24,7 +24,7 @@ module Maxcrm
24
24
  end
25
25
 
26
26
  def die_without_configuration
27
- raise "MaxCRM has not been configured. Please set the Heroku environment variables or create config/maxcrm.yml. See the MaxCRM gem's README for more information."
27
+ raise "MaxCRM has not been configured. Please set the environment variables or create config/maxcrm.yml. See the MaxCRM gem's README for more information."
28
28
  end
29
29
  end
30
30
  end
data/lib/maxcrm.rb CHANGED
@@ -9,10 +9,12 @@ module Maxcrm
9
9
  class << self
10
10
  attr_accessor :config #Use eg Maxcrm.config["url"]
11
11
  end
12
-
13
- class Railtie < Rails::Railtie
14
- initializer "maxcrm.setup" do
15
- Maxcrm.configure
16
- end
17
- end
18
12
  end
13
+
14
+ if defined?(Rails)
15
+ if Rails.version[0..0] == "2"
16
+ require 'rails_2_init'
17
+ elsif Rails.version[0..0] == "3"
18
+ require 'rails_3_init'
19
+ end
20
+ end
@@ -0,0 +1 @@
1
+ Maxcrm.configure
@@ -0,0 +1,7 @@
1
+ module Maxcrm
2
+ class Railtie < Rails::Railtie
3
+ initializer "maxcrm.setup" do
4
+ Maxcrm.configure
5
+ end
6
+ end
7
+ end
data/maxcrm.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{maxcrm}
8
- s.version = "0.1.1"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Gwyn Morfey"]
12
- s.date = %q{2010-09-20}
12
+ s.date = %q{2010-09-21}
13
13
  s.description = %q{Install this gem to your project to manage your users and events through MaxCRM.}
14
14
  s.email = %q{gwyn@new-bamboo.co.uk}
15
15
  s.extra_rdoc_files = [
@@ -26,6 +26,8 @@ Gem::Specification.new do |s|
26
26
  "lib/api.rb",
27
27
  "lib/configuration.rb",
28
28
  "lib/maxcrm.rb",
29
+ "lib/rails_2_init.rb",
30
+ "lib/rails_3_init.rb",
29
31
  "maxcrm.gemspec",
30
32
  "spec/maxcrm_spec.rb",
31
33
  "spec/spec.opts",
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maxcrm
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 23
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
- - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
10
11
  platform: ruby
11
12
  authors:
12
13
  - Gwyn Morfey
@@ -14,49 +15,52 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-09-20 00:00:00 +01:00
18
+ date: 2010-09-21 00:00:00 +01:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
- name: rspec
22
22
  requirement: &id001 !ruby/object:Gem::Requirement
23
23
  none: false
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
+ hash: 13
27
28
  segments:
28
29
  - 1
29
30
  - 2
30
31
  - 9
31
32
  version: 1.2.9
32
33
  type: :development
34
+ name: rspec
33
35
  prerelease: false
34
36
  version_requirements: *id001
35
37
  - !ruby/object:Gem::Dependency
36
- name: rest-client
37
38
  requirement: &id002 !ruby/object:Gem::Requirement
38
39
  none: false
39
40
  requirements:
40
41
  - - ">="
41
42
  - !ruby/object:Gem::Version
43
+ hash: 7
42
44
  segments:
43
45
  - 1
44
46
  - 4
45
47
  version: "1.4"
46
48
  type: :runtime
49
+ name: rest-client
47
50
  prerelease: false
48
51
  version_requirements: *id002
49
52
  - !ruby/object:Gem::Dependency
50
- name: rest-client
51
53
  requirement: &id003 !ruby/object:Gem::Requirement
52
54
  none: false
53
55
  requirements:
54
56
  - - ">="
55
57
  - !ruby/object:Gem::Version
58
+ hash: 3
56
59
  segments:
57
60
  - 0
58
61
  version: "0"
59
62
  type: :runtime
63
+ name: rest-client
60
64
  prerelease: false
61
65
  version_requirements: *id003
62
66
  description: Install this gem to your project to manage your users and events through MaxCRM.
@@ -78,6 +82,8 @@ files:
78
82
  - lib/api.rb
79
83
  - lib/configuration.rb
80
84
  - lib/maxcrm.rb
85
+ - lib/rails_2_init.rb
86
+ - lib/rails_3_init.rb
81
87
  - maxcrm.gemspec
82
88
  - spec/maxcrm_spec.rb
83
89
  - spec/spec.opts
@@ -96,6 +102,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
102
  requirements:
97
103
  - - ">="
98
104
  - !ruby/object:Gem::Version
105
+ hash: 3
99
106
  segments:
100
107
  - 0
101
108
  version: "0"
@@ -104,6 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
111
  requirements:
105
112
  - - ">="
106
113
  - !ruby/object:Gem::Version
114
+ hash: 3
107
115
  segments:
108
116
  - 0
109
117
  version: "0"