README.md in charger-0.0.2 vs README.md in charger-0.0.3
- old
+ new
@@ -1,25 +1,45 @@
# Charger
-TODO: Write a gem description
+A different gem to interact with Chargify's API.
## Installation
-Add this line to your application's Gemfile:
+```rb
+gem 'charger'
+```
- gem 'charger'
+## Usage
-And then execute:
+If you are using Rails, you could do the following
- $ bundle
+```rb
+# config/initializers/charger.rb
+Charger.configure do |config|
+ config.site = {
+ subdomain: ENV['CHARGIFY_URL'],
+ api_key: ENV['CHARGIFY_TOKEN']
+ }
+end
-Or install it yourself as:
+# Some other file
+mrr = 0.0
+at_risk_mrr = 0.0
- $ gem install charger
+Charger::Subscription.all.each do |subscription|
+ if subscription.live?
+ mrr += subscription.mrr
+ end
+ if subscription.problem?
+ at_risk_mrr += subscription.mrr
+ end
+end
-## Usage
+puts "MRR: #{mrr}"
+puts "At Risk MRR: #{at_risk_mrr}"
+```
-TODO: Write usage instructions here
+For more information on what is available, you'll need to check the source code.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)