stackbuilders-campfire_export 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96826b6614180002c20ca4eac6c14ab1901fc713
4
- data.tar.gz: 4266d75b156395fa14d055d1173b8295fcceed69
3
+ metadata.gz: 9091b99d9d162b7df38f18c596d0721824fbbf0c
4
+ data.tar.gz: be9d6f9c487e660c30702d8c884746159a8c3dd8
5
5
  SHA512:
6
- metadata.gz: e7e04a5e2691fe92c9cefe3c9d680c8b6f2de14ee027894730012e4885531747ef9901b436ec2d9b0da59c95e38586dddf713c34950c2c242425e81a64fb95bd
7
- data.tar.gz: 920b6122d9f8b4e4c9cf9c3d19ea2cca5418b7c3776434d9a154af29e3a064ff397cd38acec6cc14d949799e41ebd6719090eaf0b8e3529ff7199510fa15d3db
6
+ metadata.gz: be7807f8d34968d4d2797d8b91c2384db5c647566ac19ce1174360d8badddff586b0bde8798c3d26205ec0bc4e55f7872357f2c8afedd1ab64e4ae41e551462a
7
+ data.tar.gz: ec3362829e4d60315fe19b31284a110464814b600661f81ee88446d7531935c365f7993e5555708e59024da5f746b370007a2ad7c9589a8e518f93c4a7625c53
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Quick Start ##
6
6
 
7
- $ sudo gem install stackbuilders-campfire_export
7
+ $ gem install stackbuilders-campfire_export
8
8
  $ campfire_export
9
9
 
10
10
  ## Note ##
@@ -58,21 +58,21 @@ recommend having the latest version of RubyGems installed before starting.
58
58
 
59
59
  Once you are set up, to install, run the following:
60
60
 
61
- $ sudo gem install campfire_export
61
+ $ gem install campfire_export
62
62
 
63
63
  ## Configuring ##
64
64
 
65
65
  There are a number of configuration variables required to run the export. The
66
66
  export script will prompt you for these; just run it and away you go. If you
67
67
  want to run the script repeatedly or want to control the start and end date of
68
- the export, you can create a `.campfire_export.yaml` file in your home
68
+ the export, you can create a `.campfire_export.yml` file in your home
69
69
  directory using this template:
70
70
 
71
71
  # Your Campfire subdomain (for 'https://myco.campfirenow.com', use 'myco').
72
72
  subdomain: myco
73
73
 
74
74
  # Your Campfire API token (see "My Info" on your Campfire site).
75
- api_token: abababababababababababababababababababab
75
+ api_token: your-campfire-token
76
76
 
77
77
  # OPTIONAL: Export start date - the first transcript you want exported.
78
78
  # Uncomment to set. Defaults to the date each room was created.
@@ -42,7 +42,7 @@ def ensure_config_for(config, key, prompt)
42
42
  end
43
43
 
44
44
  config = {}
45
- config_file = File.join(ENV['HOME'], '.campfire_export.yaml')
45
+ config_file = File.join(ENV['HOME'], '.campfire_export.yml')
46
46
 
47
47
  if File.exists?(config_file) and File.readable?(config_file)
48
48
  config = YAML.load_file(config_file)
@@ -1,3 +1,3 @@
1
1
  module CampfireExport
2
- VERSION = "0.4.1"
2
+ VERSION = "0.5.0"
3
3
  end
@@ -22,7 +22,7 @@ module CampfireExport
22
22
 
23
23
  @bad_timezone = @good_timezone.gsub('America/Los_Angeles',
24
24
  'No Such Timezone')
25
- @account_xml = stub("Account XML")
25
+ @account_xml = double("Account XML")
26
26
  @account_xml.stub(:body).and_return(@good_timezone)
27
27
  end
28
28
 
@@ -64,18 +64,17 @@ module CampfireExport
64
64
  context "when rooms are requested" do
65
65
  it "returns an array of rooms" do
66
66
  room_xml = "<rooms><room>1</room><room>2</room><room>3</room></rooms>"
67
- room_doc = mock("room doc")
67
+ room_doc = double("room doc")
68
68
  room_doc.should_receive(:body).and_return(room_xml)
69
69
  @account.should_receive(:get).with('/rooms.xml').and_return(room_doc)
70
- room = mock("room")
70
+ room = double("room")
71
71
  Room.should_receive(:new).exactly(3).times.and_return(room)
72
- @account.rooms.should have(3).items
72
+ expect(@account.rooms.size).to eq(3)
73
73
  end
74
74
 
75
75
  it "raises an error if it can't get the room list" do
76
- @account.stub(:get).with('/rooms.xml'
77
- ).and_raise(CampfireExport::Exception.new('/rooms.xml',
78
- "Not Found", 404))
76
+ allow(@account).to receive(:get).with('/rooms.xml') { raise(CampfireExport::Exception.new('/rooms.xml', "Not Found", 404)) }
77
+
79
78
  expect {
80
79
  @account.rooms
81
80
  }.to raise_error(CampfireExport::Exception)
@@ -19,9 +19,5 @@ module CampfireExport
19
19
  room.created_at.should == DateTime.parse("2009-11-17T11:41:38Z")
20
20
  end
21
21
  end
22
-
23
- context "when it finds the last update" do
24
- it "loads the last update from the most recent message"
25
- end
26
22
  end
27
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stackbuilders-campfire_export
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc Hedlund