w1temp 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/w1temp.rb +3 -3
  2. metadata +1 -1
data/lib/w1temp.rb CHANGED
@@ -1,10 +1,10 @@
1
- class Temperature
2
- def self.setup
1
+ class TemperatureSensor
2
+ def self.initialize
3
3
  `sudo modprobe w1-gpio`
4
4
  `sudo modprobe w1-gpio`
5
5
  end
6
6
 
7
- def self.reading
7
+ def reading
8
8
  paths = Dir["/sys/bus/w1/devices/*"]
9
9
  temperature_sensor_path = paths.select{|path| path.include?('-')}.first + '/w1_slave'
10
10
  file_contents = File.read(temperature_sensor_path)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: w1temp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: