cloudability 0.0.1 → 0.0.5
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.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/.travis.yml +5 -0
- data/Gemfile +3 -11
- data/LICENSE.txt +17 -18
- data/README.md +21 -22
- data/Rakefile +8 -5
- data/cloudability.gemspec +11 -6
- data/lib/cloudability.rb +7 -7
- data/lib/cloudability/billing.rb +35 -36
- data/lib/cloudability/budgets.rb +16 -10
- data/lib/cloudability/credentials.rb +7 -5
- data/lib/cloudability/organizations.rb +71 -0
- data/lib/cloudability/time_helper.rb +4 -5
- data/lib/cloudability/version.rb +1 -1
- data/spec/cloduability/billing_spec.rb +53 -0
- data/spec/cloduability/budgets_spec.rb +65 -0
- data/spec/cloduability/credentials_spec.rb +29 -0
- data/spec/cloduability/organizations_spec.rb +64 -0
- data/spec/fixtures/all_budgets +18 -0
- data/spec/fixtures/credentials +18 -0
- data/spec/fixtures/organization +18 -0
- data/spec/fixtures/organization_invitation +18 -0
- data/spec/fixtures/organization_invitations +18 -0
- data/spec/fixtures/organization_roles +18 -0
- data/spec/fixtures/report_by_account +18 -0
- data/spec/fixtures/report_by_period +18 -0
- data/spec/spec_helper.rb +48 -0
- metadata +89 -42
- data/test/fixtures/billing_report_by-vendor.json +0 -1
- data/test/fixtures/billing_report_period.json +0 -1
- data/test/fixtures/billing_report_year.json +0 -54
- data/test/fixtures/budgets.json +0 -34
- data/test/fixtures/credentials.json +0 -28
- data/test/helper.rb +0 -22
- data/test/lib/cloudability/test_billing.rb +0 -55
- data/test/lib/cloudability/test_budgets.rb +0 -44
- data/test/lib/cloudability/test_credentials.rb +0 -21
- data/test/lib/cloudability/test_time_helper.rb +0 -24
@@ -1,24 +0,0 @@
|
|
1
|
-
require_relative '../../helper'
|
2
|
-
|
3
|
-
class TestCloudability < Test::Unit::TestCase
|
4
|
-
context "Time Helper :: When using time_helper, it" do
|
5
|
-
setup do
|
6
|
-
@mock_dt = DateTime.parse("2012-11-02T00:00:00+00:00")
|
7
|
-
@real_dt = DateTime.now
|
8
|
-
@timehelper = TimeHelper.new
|
9
|
-
end
|
10
|
-
|
11
|
-
should "return the current month in YYYY-MM-01" do
|
12
|
-
currrent_month = DateTime.now.strftime("%Y-%m-01")
|
13
|
-
@timehelper.current_month.should == currrent_month
|
14
|
-
end
|
15
|
-
|
16
|
-
should "return a Mash with the last three months in YYYY-MM-01" do
|
17
|
-
months = @timehelper.last_three_months
|
18
|
-
months.current.should == "2012-11-01"
|
19
|
-
months.last.should == "2012-10-01"
|
20
|
-
months.three.should == "2012-09-01"
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
24
|
-
end
|