test_machine_shop 0.0.4 → 0.0.5

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: 81f974034f160c246c9fd56b667434ff310ff716
4
- data.tar.gz: 980675276107dac157020f8071b0f6689cfaffc0
3
+ metadata.gz: adca9a122051a8f1c3250ac5d8ade37083fcbd99
4
+ data.tar.gz: 797aa382e1f62c3d3c3c8e14212b5338952cf91f
5
5
  SHA512:
6
- metadata.gz: a73290dea67203d2af0fec1310bc44c4d6fdf129c1354d7e5b1ec315cd5931f92606e200be01db21e96f1494791a3653f96bc2576c1ed2af71cb19ed66f6e9c3
7
- data.tar.gz: 0dbac852e53e8f3e59244d3876753454022f41c7ffa83211ada3b219b0460a30eff9b0114cb77c42d1c3556b4ae7fe4c7093ac7cc7919d225c45d0e7225aa7dc
6
+ metadata.gz: 010531071dcc4e5d6a81cd2f783d31cc363609146daaf71da5bc2a80c0115ffb6e16055015e3b310adc5f6192c0841ad70fe3569795510133f37a1cff07fca4f
7
+ data.tar.gz: 0e9095226906ca3e97a5e031bee551a66589dba7c66707e130309dbb5643344ed955f90673593e5d3ffff60243d78c2169031e77032170437b20922148bdf3bc
data/lib/machineshop.rb CHANGED
@@ -33,7 +33,8 @@ require 'machineshop/mapping'
33
33
  require 'machineshop/meter'
34
34
  require 'machineshop/report'
35
35
  require 'machineshop/customer'
36
- require 'machineshop/rule'
36
+ # require 'machineshop/rule'
37
+ require 'machineshop/rules'
37
38
  # require 'machineshop/user'
38
39
  require 'machineshop/users'
39
40
  require 'machineshop/utility'
@@ -22,7 +22,8 @@ module MachineShop
22
22
  'Mapping' => Mapping,
23
23
  'Meter' => Meter,
24
24
  'Report' => Report,
25
- 'Rule' => Rule,
25
+ # 'Rule' => Rule,
26
+ 'Rules' => Rules,
26
27
  # 'User' => User,
27
28
  'Users' => Users,
28
29
  'Utility' => Utility,
@@ -1,3 +1,4 @@
1
1
  module MachineShop
2
- VERSION = "0.0.4"
2
+ # VERSION = "1.0.2"
3
+ VERSION = "0.0.5"
3
4
  end
data/machineshop.gemspec CHANGED
@@ -11,6 +11,7 @@ Gem::Specification.new do |gem|
11
11
  gem.files = `git ls-files`.split($\)
12
12
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
13
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
+ gem.name = "machineshop"
14
15
  gem.name = "test_machine_shop"
15
16
  gem.require_paths = ["lib"]
16
17
  gem.version = MachineShop::VERSION
@@ -1,10 +1,11 @@
1
1
  require_relative '../spec_helper'
2
2
 
3
3
  #MachineShop.api_base_url= 'http://machineshop.dev:3000/api/v0'
4
- MachineShop.api_base_url= 'http://stage.services.machineshop.io/api/v0'
4
+ # MachineShop.api_base_url= 'http://stage.services.machineshop.io/api/v0'
5
+ MachineShop.api_base_url= 'localhost:3000/api/v1'
5
6
 
6
7
  #publisher_username = 'publisher@machineshop.com'
7
- publisher_username = 'admin@csr.com'
8
+ publisher_username = 'publisher@csr.com'
8
9
  publisher_password = 'password'
9
10
 
10
11
  MachineShop.configure do |config|
@@ -16,18 +17,18 @@ MachineShop.configure do |config|
16
17
  #second
17
18
  end
18
19
 
19
- auth_token, user = MachineShop::User.authenticate(
20
+ auth_token, user = MachineShop::Users.authenticate(
20
21
  :email => publisher_username,
21
22
  :password => publisher_password
22
23
  )
23
24
 
24
25
 
25
- describe MachineShop::Rule do
26
+ describe MachineShop::Rules do
26
27
 
27
28
  rules=nil
28
29
 
29
30
  it "should get all the rules " do
30
- rules = MachineShop::Rule.all({},auth_token)
31
+ rules = MachineShop::Rules.all({},auth_token)
31
32
  # puts "rules haru : #{rules}"
32
33
  # ap "getting rules"
33
34
  # ap rules.as_json
@@ -67,7 +68,7 @@ describe MachineShop::Rule do
67
68
  }
68
69
 
69
70
  # ap "creating rule "
70
- createdRule = MachineShop::Rule.create(create_hash,auth_token)
71
+ createdRule = MachineShop::Rules.create(create_hash,auth_token)
71
72
 
72
73
  # ap createdRule.as_json
73
74
 
@@ -78,8 +79,8 @@ describe MachineShop::Rule do
78
79
  specificRule = nil
79
80
 
80
81
  it "should get rule by id" do
81
- # ruleById = MachineShop::Rule.retrieve(rules[0].id,auth_token)
82
- specificRule = MachineShop::Rule.retrieve("5395b4829818008e790000f9",auth_token)
82
+ # ruleById = MachineShop::Rules.retrieve(rules[0].id,auth_token)
83
+ specificRule = MachineShop::Rules.retrieve("5395b4829818008e790000f9",auth_token)
83
84
  # ap "retrieved rule"
84
85
  # ap specificRule.as_json
85
86
  specificRule.should_not be_nil
@@ -87,7 +88,7 @@ describe MachineShop::Rule do
87
88
  end
88
89
 
89
90
  it "should delete rule by" do
90
- # ruleById = MachineShop::Rule.retrieve(rules[0].id,auth_token)
91
+ # ruleById = MachineShop::Rules.retrieve(rules[0].id,auth_token)
91
92
  delete = specificRule.delete
92
93
  # ap "Deleted rule"
93
94
  # ap delete.as_json
@@ -96,7 +97,7 @@ describe MachineShop::Rule do
96
97
  end
97
98
 
98
99
  it "should get get join rule conditions" do
99
- test_data = MachineShop::Rule.get_join_rule_conditions(auth_token)
100
+ test_data = MachineShop::Rules.get_join_rule_conditions(auth_token)
100
101
  # puts "rule comparison : #{test_data.inspect}"
101
102
  test_data.should_not be_nil
102
103
 
@@ -104,7 +105,7 @@ describe MachineShop::Rule do
104
105
 
105
106
 
106
107
  it "should get comparison rule_conditions" do
107
- test_data = MachineShop::Rule.get_comparison_rule_conditions(auth_token)
108
+ test_data = MachineShop::Rules.get_comparison_rule_conditions(auth_token)
108
109
  # ap "comparison rule condition :"
109
110
  # ap test_data.as_json
110
111
  test_data.should_not be_nil
@@ -113,7 +114,7 @@ describe MachineShop::Rule do
113
114
 
114
115
 
115
116
  it "should get rule by device_id" do
116
- test_data = MachineShop::Rule.get_by_device_instance(auth_token,'52585e1d981800bab2000478')
117
+ test_data = MachineShop::Rules.get_by_device_instance(auth_token,'52585e1d981800bab2000478')
117
118
  # ap "rule by_device_instance :"
118
119
  # ap test_data.as_json
119
120
  test_data.should_not be_nil
@@ -121,7 +122,7 @@ describe MachineShop::Rule do
121
122
  end
122
123
 
123
124
  it "should get deleted rule" do
124
- test_data = MachineShop::Rule.get_deleted(auth_token)
125
+ test_data = MachineShop::Rules.get_deleted(auth_token)
125
126
  # puts "deleted rule : #{test_data.inspect}"
126
127
  test_data.should_not be_nil
127
128
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_machine_shop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - machineshop