comufyrails 0.0.1 → 0.0.2
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/lib/comufyrails.rb +1 -0
- data/lib/comufyrails/connection.rb +10 -0
- data/lib/comufyrails/railtie.rb +9 -12
- data/lib/comufyrails/version.rb +1 -1
- metadata +3 -2
data/lib/comufyrails.rb
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
|
2
|
+
module Comufyrails::Connection
|
3
|
+
|
4
|
+
# aim of this module is to will be to allow sync/async connections to be sent to our heroku servers
|
5
|
+
# to be processed and then returned (or the error message returned)
|
6
|
+
|
7
|
+
# with this in mind, we will probably be using https://github.com/igrigorik/em-synchrony
|
8
|
+
# with apost and post requests to send and receive data. It'll use the information generated from the Railtie
|
9
|
+
# to know what/who is sending and to where.
|
10
|
+
end
|
data/lib/comufyrails/railtie.rb
CHANGED
@@ -3,23 +3,20 @@ require 'rails'
|
|
3
3
|
class Comufyrails::Railtie < Rails::Railtie
|
4
4
|
|
5
5
|
# this allows users to manage settings just like they manage rails settings
|
6
|
-
config.
|
6
|
+
config.comufy_rails = ActiveSupport::OrderedOptions.new # enable namespaced configuration in Rails environment
|
7
7
|
|
8
8
|
rake_tasks do
|
9
9
|
# load "path/to/my_railtie.tasks"
|
10
10
|
end
|
11
11
|
|
12
|
-
initializer "comufyrails.
|
13
|
-
#unless defined?(COMUFY)
|
14
|
-
# silence_warnings { Object.const_set "COMUFY", app.config.comufy }
|
15
|
-
#end
|
12
|
+
initializer "comufyrails.configure" do |app|
|
16
13
|
Comufyrails.configure do |config|
|
17
|
-
config.app_name = app.config.
|
18
|
-
config.username = app.config.
|
19
|
-
config.password = app.config.
|
20
|
-
config.access_token = app.config.
|
21
|
-
config.
|
22
|
-
config.base_api_url = app.config.
|
14
|
+
config.app_name = app.config.comufy_rails[:app_name] || Comufyrails::Railtie.app_name
|
15
|
+
config.username = app.config.comufy_rails[:username] || Comufyrails::Railtie.username
|
16
|
+
config.password = app.config.comufy_rails[:password] || Comufyrails::Railtie.password
|
17
|
+
config.access_token = app.config.comufy_rails[:access_token] || Comufyrails::Railtie.access_token
|
18
|
+
config.expiry_time = app.config.comufy_rails[:expiry_time] || Comufyrails::Railtie.expiry_time
|
19
|
+
config.base_api_url = app.config.comufy_rails[:base_api_url] || Comufyrails::Railtie.base_api_url
|
23
20
|
end
|
24
21
|
end
|
25
22
|
|
@@ -47,7 +44,7 @@ class Comufyrails::Railtie < Rails::Railtie
|
|
47
44
|
ENV.fetch('COMUFY_TOKEN', nil)
|
48
45
|
end
|
49
46
|
|
50
|
-
def self.
|
47
|
+
def self.expiry_time
|
51
48
|
ENV.fetch('COMUFY_EXPIRY_TIME', nil)
|
52
49
|
end
|
53
50
|
|
data/lib/comufyrails/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comufyrails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- Rakefile
|
75
75
|
- comufyrails.gemspec
|
76
76
|
- lib/comufyrails.rb
|
77
|
+
- lib/comufyrails/connection.rb
|
77
78
|
- lib/comufyrails/railtie.rb
|
78
79
|
- lib/comufyrails/version.rb
|
79
80
|
homepage: https://github.com/plcstevens/comufyrails
|
@@ -99,5 +100,5 @@ rubyforge_project:
|
|
99
100
|
rubygems_version: 1.8.24
|
100
101
|
signing_key:
|
101
102
|
specification_version: 3
|
102
|
-
summary: comufyrails-0.0.
|
103
|
+
summary: comufyrails-0.0.2
|
103
104
|
test_files: []
|