glitchy_gem 0.1 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # GlitchyGem
2
+
3
+ To install go to http://glitchapp.com and create an account. Click edit profile and save your API Key. Create a file in you config/initializers directory called glitchy.rb and put this in it:
4
+
5
+ ```ruby
6
+ GlitchyGem.configure do |config|
7
+ config.api_key = "YOUR_API_KEY"
8
+ end
9
+ ```
10
+
11
+ This Gem with work with Rails 2.3.x and up
data/lib/glitchy_gem.rb CHANGED
@@ -5,9 +5,11 @@ require 'glitchy_gem/railtie' if defined?(Rails::Railtie)
5
5
 
6
6
  module GlitchyGem
7
7
  class << self
8
- attr_accessor :api_key, :environment, :logger, :url
8
+ attr_accessor :api_key, :environment, :logger, :url, :environments
9
9
  def configure
10
10
  yield(self)
11
+
12
+ self.environments ||= ["production"]
11
13
  end
12
14
  end
13
15
  end
@@ -19,6 +19,7 @@ module GlitchyGem
19
19
  end
20
20
 
21
21
  def send
22
+ return unless GlitchyGem.environments.include?(GlitchGem.environment)
22
23
  begin
23
24
  @http.request(@request)
24
25
  rescue Errno::ECONNREFUSED => e
@@ -1,3 +1,3 @@
1
1
  module GlitchyGem
2
- VERSION = "0.1"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glitchy_gem
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
+ - 2
8
9
  - 1
9
- version: "0.1"
10
+ version: 0.2.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - GlitchyApp
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-06-18 00:00:00 -07:00
18
+ date: 2011-06-21 00:00:00 -07:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
@@ -45,6 +46,7 @@ extra_rdoc_files: []
45
46
  files:
46
47
  - .gitignore
47
48
  - Gemfile
49
+ - README.md
48
50
  - Rakefile
49
51
  - glitchy_gem.gemspec
50
52
  - lib/glitchy_gem.rb