duraflame 0.1.0 → 0.2.0
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/Gemfile +10 -0
- data/Gemfile.lock +30 -0
- data/Rakefile +4 -0
- data/duraflame.gemspec +4 -2
- data/lib/duraflame.rb +1 -1
- data/lib/duraflame/message.rb +6 -0
- data/spec/fixtures/transcript.json +8 -0
- data/spec/integration_spec.rb +8 -1
- metadata +11 -7
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
addressable (2.2.8)
|
5
|
+
crack (0.3.1)
|
6
|
+
diff-lcs (1.1.3)
|
7
|
+
httpclient (2.2.5)
|
8
|
+
rake (0.9.2.2)
|
9
|
+
rspec (2.10.0)
|
10
|
+
rspec-core (~> 2.10.0)
|
11
|
+
rspec-expectations (~> 2.10.0)
|
12
|
+
rspec-mocks (~> 2.10.0)
|
13
|
+
rspec-core (2.10.1)
|
14
|
+
rspec-expectations (2.10.0)
|
15
|
+
diff-lcs (~> 1.1.3)
|
16
|
+
rspec-mocks (2.10.1)
|
17
|
+
webmock (1.8.7)
|
18
|
+
addressable (>= 2.2.7)
|
19
|
+
crack (>= 0.1.7)
|
20
|
+
yajl-ruby (1.1.0)
|
21
|
+
|
22
|
+
PLATFORMS
|
23
|
+
ruby
|
24
|
+
|
25
|
+
DEPENDENCIES
|
26
|
+
httpclient (~> 2.2)
|
27
|
+
rake
|
28
|
+
rspec (~> 2)
|
29
|
+
webmock
|
30
|
+
yajl-ruby (~> 1.1)
|
data/Rakefile
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'rake'
|
2
|
+
require 'rspec/core/rake_task'
|
2
3
|
require 'date'
|
3
4
|
|
4
5
|
#############################################################################
|
@@ -53,7 +54,10 @@ end
|
|
53
54
|
#
|
54
55
|
#############################################################################
|
55
56
|
|
57
|
+
task :default => :spec
|
56
58
|
|
59
|
+
desc "Run specs"
|
60
|
+
RSpec::Core::RakeTask.new
|
57
61
|
|
58
62
|
#############################################################################
|
59
63
|
#
|
data/duraflame.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'duraflame'
|
3
|
-
s.version = '0.
|
4
|
-
s.date = '2012-
|
3
|
+
s.version = '0.2.0'
|
4
|
+
s.date = '2012-06-29'
|
5
5
|
|
6
6
|
s.summary = "A command line tool that converts Campfire transcripts to an IRC log format"
|
7
7
|
s.description = "Generate pisg (Perl IRC Statistics Generator) stats on Campfire conversations"
|
@@ -21,6 +21,8 @@ Gem::Specification.new do |s|
|
|
21
21
|
|
22
22
|
# = MANIFEST =
|
23
23
|
s.files = %w[
|
24
|
+
Gemfile
|
25
|
+
Gemfile.lock
|
24
26
|
MIT-LICENSE
|
25
27
|
README.md
|
26
28
|
Rakefile
|
data/lib/duraflame.rb
CHANGED
data/lib/duraflame/message.rb
CHANGED
@@ -29,5 +29,13 @@
|
|
29
29
|
"starred" : false,
|
30
30
|
"type" : "TimestampMessage",
|
31
31
|
"user_id" : null
|
32
|
+
},
|
33
|
+
{ "type":"TopicChangeMessage",
|
34
|
+
"room_id": 1,
|
35
|
+
"created_at":"2012/05/25 08:31:47 +0000",
|
36
|
+
"starred":false,
|
37
|
+
"id":579912121,
|
38
|
+
"user_id":1,
|
39
|
+
"body":"prime directive"
|
32
40
|
}
|
33
41
|
] }
|
data/spec/integration_spec.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require_relative 'helper'
|
2
|
+
require 'tmpdir'
|
2
3
|
|
3
4
|
describe 'Duraflame under integration' do
|
4
5
|
before(:all) do
|
@@ -17,11 +18,13 @@ describe 'Duraflame under integration' do
|
|
17
18
|
}
|
18
19
|
Duraflame.execute(options)
|
19
20
|
|
21
|
+
ENV['TZ'] = 'UTC'
|
22
|
+
|
20
23
|
@log = File.readlines(Dir.tmpdir + "/2012-01-01-#{options[:room]}.log")
|
21
24
|
end
|
22
25
|
|
23
26
|
it 'should output three lines' do
|
24
|
-
@log.length.should ==
|
27
|
+
@log.length.should == 4
|
25
28
|
end
|
26
29
|
|
27
30
|
it 'should contain Sisko joining' do
|
@@ -35,4 +38,8 @@ describe 'Duraflame under integration' do
|
|
35
38
|
it 'should contain Sisko leaving' do
|
36
39
|
@log[2].should include('02:20 -!- Benjamin Sisko [hostname] has left')
|
37
40
|
end
|
41
|
+
|
42
|
+
it 'should contain the topic changing' do
|
43
|
+
@log[3].should match(/04:31 -!- Benjamin Sisko changed the topic .* to: prime directive/)
|
44
|
+
end
|
38
45
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: duraflame
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-29 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httpclient
|
16
|
-
requirement: &
|
16
|
+
requirement: &2156798460 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '2.2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2156798460
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: yajl-ruby
|
27
|
-
requirement: &
|
27
|
+
requirement: &2156796520 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '1.1'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2156796520
|
36
36
|
description: Generate pisg (Perl IRC Statistics Generator) stats on Campfire conversations
|
37
37
|
email: alexanderkahn@gmail.com
|
38
38
|
executables:
|
@@ -42,6 +42,8 @@ extra_rdoc_files:
|
|
42
42
|
- README.md
|
43
43
|
- MIT-LICENSE
|
44
44
|
files:
|
45
|
+
- Gemfile
|
46
|
+
- Gemfile.lock
|
45
47
|
- MIT-LICENSE
|
46
48
|
- README.md
|
47
49
|
- Rakefile
|
@@ -71,6 +73,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
71
73
|
- - ! '>='
|
72
74
|
- !ruby/object:Gem::Version
|
73
75
|
version: '0'
|
76
|
+
segments:
|
77
|
+
- 0
|
78
|
+
hash: -1033088075624549
|
74
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
80
|
none: false
|
76
81
|
requirements:
|
@@ -85,4 +90,3 @@ specification_version: 3
|
|
85
90
|
summary: A command line tool that converts Campfire transcripts to an IRC log format
|
86
91
|
test_files:
|
87
92
|
- spec/integration_spec.rb
|
88
|
-
has_rdoc:
|