beeline 0.0.4 → 0.0.5

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTU0YmNiZmM2ZDQwM2Q0MDBiNDVhNTA4NWE3ZDNmNTg3ZjcwYzI5Yw==
4
+ ZWQwMzU4YjllNTQ2MzQ0ZWNhNzUwNWM2MDVmZjI1MDA3NTY0OGJhYw==
5
5
  data.tar.gz: !binary |-
6
- OGJkOGIwNWFmZGI5NDBkYTFhYWRhMjdhZjViMjY3ZDk0OWNkMDliMg==
6
+ Njc3YjUzMjc4MzczYzE3NTljMzkzZTM5YWRhMTMxZDA1MWRjMDRhNg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YmI1OTk4MDlmZjY5ZWM0NmRjZGFjMzVhMDQ4MjU2OWEyNzQxODVhNGM4NmVk
10
- OTZhODQ5MTM4ZmIyMTcxZmI0YWViYmY5Y2MxMmVjYzBjNGI0Njc5N2NhMWY4
11
- NmU5NDMzZjQ2ODQ2ZGVlOTBlNmJhNTZjZTQxMDA1ZTkzZDAyZjU=
9
+ OTRmNzkxZDhkODUzYzc4Mzk2NDk4ZmEyZjMzZDJiMTI3MzRmNzFjMWE2N2M2
10
+ NGE0NTYyNzVmMTY4NDAzYTY0NDYwMWU2MjNiNmFmMWZiY2VlN2Q1Mzg2NjIx
11
+ NjczMGRjOWViZjViZTYwY2M5ZDI2MmQxYWYzMTI4Mjg1NDk5ZDY=
12
12
  data.tar.gz: !binary |-
13
- NTk4ZmNmMGU0YTc1NmI4NmY1ZWI3Y2MyYzRmYWUzZWY1NWZiNmQyNWEwMWFh
14
- NTNmMTFhZDAwOGY1ZTE0OGExMTIxYzdjNzVlMmE1MDY5NTI0ODIyZDY0ODFh
15
- YTk0ODVkM2UyODE3Njg0YmQ4ODViY2RiODNmZWYxY2RmNzQ2NDM=
13
+ N2NiMGNiYzM3Mzk0OThjODdiNzdjYzJiMTg0MDlmZjU3ZWIwNDhjOTZiOWYz
14
+ ODU5OTBmYWEyN2Q1YzdkYTkwZGM1NmU5Y2QyMjUyYmM4NjViY2YyMDJjMjBl
15
+ NGU3MzUzMTYwZGExMDEzN2NiNzE0OTFjZGE4NTE2Y2Q5NzcyOTk=
data/bin/beeline CHANGED
@@ -1,28 +1,3 @@
1
- #!/usr/bin/env ruby
2
- require 'digest/md5'
3
- file_prefix = 'tmp/cache/routes_'
4
-
5
- md5 = Digest::MD5::new
6
- unless File.exist?('config/routes.rb')
7
- puts "Must be used in a Rails project"
8
- exit 0
9
- end
10
-
11
- puts "... Creating checksums"
12
- new_checksum = md5.update(File.binread('config/routes.rb'))
13
- old_file = Dir.glob("#{file_prefix}*").first
14
- old_checksum = (old_file || '').sub(file_prefix, '')
15
-
16
- puts "Old Checksum is:#{old_checksum}"
17
- puts "New Checksum is:#{new_checksum}"
18
-
19
- unless new_checksum == old_checksum
20
- File.delete(old_file) if old_file
21
- puts 'bundle exec rake routes'
22
- routes = `bundle exec rake routes`
23
- File.open("#{file_prefix}#{new_checksum}", 'w') { |file| file.write(routes) }
24
- else
25
- puts " => Routes Have Not Changed "
26
- end
27
- puts '************************'
28
- puts File.open("#{file_prefix}#{new_checksum}").read()
1
+ #!/usr/bin/env bash
2
+ ruby ./lib/beeline.rb;
3
+ cat tmp/cache/routes_*
data/lib/beeline.rb CHANGED
@@ -1,8 +1,30 @@
1
1
  require "beeline/version"
2
+ require 'digest/md5'
2
3
 
3
4
  module Beeline
4
- module Rails
5
- class Engine < ::Rails::Engine
6
- end
5
+ file_prefix = 'tmp/cache/routes_'
6
+
7
+ md5 = Digest::MD5::new
8
+ unless File.exist?('config/routes.rb')
9
+ puts "Must be used in a Rails project"
10
+ exit 0
11
+ end
12
+
13
+ puts "... Creating checksums"
14
+ new_checksum = md5.update(File.binread('config/routes.rb'))
15
+ old_file = Dir.glob("#{file_prefix}*").first
16
+ old_checksum = (old_file || '').sub(file_prefix, '')
17
+
18
+ puts "Old Checksum is:#{old_checksum}"
19
+ puts "New Checksum is:#{new_checksum}"
20
+
21
+ unless new_checksum == old_checksum
22
+ File.delete(old_file) if old_file
23
+ puts 'bundle exec rake routes'
24
+ routes = `bundle exec rake routes`
25
+ File.open("#{file_prefix}#{new_checksum}", 'w') { |file| file.write(routes) }
26
+ else
27
+ puts " => Routes Have Not Changed "
7
28
  end
29
+ puts '************************'
8
30
  end
@@ -1,3 +1,3 @@
1
1
  module Beeline
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beeline
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
  - Rich Soni