emmy 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2041fb4a9d568e8e20f44d949d9135f4676bdd00
4
- data.tar.gz: 0d2d66054fa2e3c35bb810ccfed7c71f66d290ad
3
+ metadata.gz: 84a1412b90058a8a3043c5659fbb3f78b6530a71
4
+ data.tar.gz: c2925633a083353fd23ca923f14655e48c2026cc
5
5
  SHA512:
6
- metadata.gz: 032fcbae35f052d0651da036400d68b7b1ea96ca500e1f50c26188fd0903c187709cb7965e545a206c46de7a8c3fe15f60e29bec09b195b6d880bad5cedf5f3a
7
- data.tar.gz: c6f11dd40c7bf0b1895a1705d67fb91e4e7f6659d3a243366ec91ec74b4181ffe8ce7ae9ede913aa66db4255c4fe0653a49fa6c1956274b1af86e83959210f10
6
+ metadata.gz: c5109ef3e2451249875f9de8fc8d7a990df43a5e4bf6a40c412ecef5a9d20a5b4ee0701040a7e2439ca13120a6c3e119c4b270529bac24728a426d39d12320b7
7
+ data.tar.gz: 1a61d6f352656c2d20a6eed1a90ee116f3bcac5ef3ef5ff0f7bfc57aec25ab455dd54584e2089998458b617613c5e662342c3526b2c5621e095ab2b71adbbe11
@@ -1,3 +1,3 @@
1
1
  module EmmyMachine
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -0,0 +1,44 @@
1
+ require "spec_helper"
2
+
3
+ describe EmmyMachine do
4
+ using EventObject
5
+
6
+ it "test run_block" do
7
+ expect { |block|
8
+ EmmyMachine.run_block &block
9
+ }.to yield_control
10
+ end
11
+
12
+ it "test connect" do
13
+ expect { |block|
14
+ EventMachine.run do
15
+ http = EmmyMachine.connect("tcp://github.com:80")
16
+ http.on :connect do
17
+ http.send_data "GET / HTTP/1.1\r\n" \
18
+ "Host: ru.wikipedia.org\r\n" \
19
+ "User-Agent: Ruby\r\n" \
20
+ "Accept: text/html\r\n" \
21
+ "Connection: close\r\n\r\n"
22
+ end
23
+
24
+ http.on :data, &block
25
+ http.on :close do
26
+ EventMachine.stop
27
+ end
28
+ end
29
+ }.to yield_control.at_least(1)
30
+ end
31
+
32
+ context "Reactor required" do
33
+ around do |example|
34
+ EventMachine.run do
35
+ example.run
36
+ EventMachine.stop
37
+ end
38
+ end
39
+
40
+ it "test running?" do
41
+ expect(EmmyMachine.running?).to be true
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,8 @@
1
+ require 'bundler/setup'
2
+ Bundler.setup
3
+
4
+ require File.expand_path("./lib/emmy_machine")
5
+
6
+ RSpec.configure do |config|
7
+ config.color = true
8
+ end
data/lib/emmy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Emmy
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/spec/emmy_spec.rb ADDED
@@ -0,0 +1,11 @@
1
+ require "spec_helper"
2
+
3
+ describe Emmy do
4
+ using EventObject
5
+
6
+ it "test run_block" do
7
+ expect { |block|
8
+ Emmy.run_block &block
9
+ }.to yield_control
10
+ end
11
+ end
@@ -0,0 +1,8 @@
1
+ require 'bundler/setup'
2
+ Bundler.setup
3
+
4
+ require File.expand_path("./lib/emmy")
5
+
6
+ RSpec.configure do |config|
7
+ config.color = true
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emmy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - che
@@ -102,9 +102,13 @@ files:
102
102
  - emmy-machine/lib/emmy_machine/class_methods.rb
103
103
  - emmy-machine/lib/emmy_machine/connection.rb
104
104
  - emmy-machine/lib/emmy_machine/version.rb
105
+ - emmy-machine/spec/emmy_machine_spec.rb
106
+ - emmy-machine/spec/spec_helper.rb
105
107
  - emmy.gemspec
106
108
  - lib/emmy.rb
107
109
  - lib/emmy/version.rb
110
+ - spec/emmy_spec.rb
111
+ - spec/spec_helper.rb
108
112
  homepage: ''
109
113
  licenses:
110
114
  - MIT
@@ -129,4 +133,6 @@ rubygems_version: 2.4.1
129
133
  signing_key:
130
134
  specification_version: 4
131
135
  summary: Emmy - EventMachine-based framework
132
- test_files: []
136
+ test_files:
137
+ - spec/emmy_spec.rb
138
+ - spec/spec_helper.rb