daslabs 0.7.0 → 0.8.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15ff8f2ec6455045027f4a080e03640b3e46cf7f
4
- data.tar.gz: ce99eb1ceba173df766a99fc49d8fccf898fd1ab
3
+ metadata.gz: 35799bc6277f30584d9fdfadcab1bbf8b35bb072
4
+ data.tar.gz: 6106c9c3dfe3dec8e75cb1e96edf1b5b23a06cfa
5
5
  SHA512:
6
- metadata.gz: 50d00c5aeb7d3ca9b7b9e85f256e6ca76c25afa19604b5632b7203f176ed8d73187607f4f91b375c59714b0b404c6e997ab94d96293363f8017cba736c0709ba
7
- data.tar.gz: ed7b8c368be4f32a65336404d288629e1e5de4da1bde435c60bb9c6032319f715e2319c159e2e148623bb54ba73eea6fb66d0d809b06dd39d3ef618db2c534e1
6
+ metadata.gz: 7d6f9711744a13416af5a465135c6177dfafa59f7f01150adb06d06f2a82de7880829403fa44bcc7d8d4dd30140768361720c9ac46543a702568a2d47087ff48
7
+ data.tar.gz: f7e0a2655673519120629470af389d714ba19f43ef249ba874aaea8a2e7afedc698994c0e2c757ce870242c759a475ecd39899134dca734e87ba6d5be505d0c0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- daslabs (0.5.0)
4
+ daslabs (0.8.0)
5
5
  nokogiri (>= 1.5.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -73,7 +73,7 @@ Update VERSION in version.rb
73
73
 
74
74
  ==> gem build daslabs.gemspec
75
75
 
76
- ==> gem push daslabs-0.6.0.gem
76
+ ==> gem push daslabs-0.x.0.gem
77
77
 
78
78
 
79
79
  # Check version
@@ -1,4 +1,5 @@
1
1
  require 'tty-prompt'
2
+ require 'daslabs'
2
3
 
3
4
 
4
5
  prompt = TTY::Prompt.new
@@ -8,4 +9,6 @@ prompt.yes?('Would you like to populate the app with sample data?')
8
9
 
9
10
 
10
11
  choices = %w(tabs sidemenu blank)
11
- prompt.multi_select("What type of template would you like?", choices)
12
+ prompt.multi_select("What type of template would you like?", choices)
13
+
14
+ DasLabs.generate_android_xml("Mozart")
data/examples/shell.rb CHANGED
@@ -36,7 +36,8 @@ io = HighLine.new
36
36
  shell = ShellUI.new
37
37
  console = CLI::Console.new(io)
38
38
  puts "Current directory: #{Dir.pwd}"
39
- DasLabs.hi("Welcome to DasLabs")
39
+ daslabs = DasLabs.new
40
+ daslabs.generate_android_xml("Welcome to DasLabs")
40
41
  console.addCommand('ls', shell.method(:ls), 'List files')
41
42
  console.addCommand('pwd', shell.method(:pwd), 'Current directory')
42
43
  console.addCommand('cd', shell.method(:cd), 'Change directory')
data/lib/daslabs.rb CHANGED
@@ -11,7 +11,7 @@ module DasLabs
11
11
 
12
12
  def self.generate_android_xml(n = "Default Name")
13
13
 
14
- droidband = Droidband
15
- Droidband.generate_android_xml(n)
14
+ baseband = Baseband
15
+ Baseband.generate_android_xml(n)
16
16
  end
17
17
  end
@@ -3,7 +3,7 @@ require 'nokogiri'
3
3
 
4
4
 
5
5
  class Baseband
6
- def self.name(n = "Baseband")
6
+ def self.generate_html(n = "Baseband")
7
7
  puts "Writing output.html to : #{Dir.pwd}"
8
8
  doc = Nokogiri::HTML <<-EOHTML
9
9
  <html>
@@ -26,5 +26,29 @@ class Baseband
26
26
  outfile.puts doc.to_html
27
27
  outfile.close
28
28
  end
29
+
30
+ def self.generate_android_xml(n = "Baseband")
31
+ puts "Writing output.xml to : #{Dir.pwd}"
32
+ doc = Nokogiri::HTML <<-EOHTML
33
+ <xml>
34
+ <body>
35
+ <item>
36
+ <time>05.04.2011 9:53:23</time>
37
+ <iddqd>42</iddqd>
38
+ <idkfa>woot</idkfa>
39
+ </item>
40
+ </body>
41
+ </xml>
42
+ EOHTML
43
+
44
+ hammer = doc.at_css "time"
45
+ hammer.name = n
46
+ doc.css("iddqd").remove
47
+ doc.css("idkfa").remove
48
+
49
+ outfile = File.new("output.xml", "w")
50
+ outfile.puts doc.to_html
51
+ outfile.close
52
+ end
29
53
  end
30
54
 
@@ -1,3 +1,3 @@
1
1
  module Daslabs
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daslabs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arunabh Das
@@ -74,7 +74,6 @@ files:
74
74
  - examples/shell.rb
75
75
  - lib/daslabs.rb
76
76
  - lib/daslabs/baseband.rb
77
- - lib/daslabs/droidband.rb
78
77
  - lib/daslabs/version.rb
79
78
  - vendor/cache/mini_portile2-2.3.0.gem
80
79
  - vendor/cache/nokogiri-1.8.2.gem
@@ -1,30 +0,0 @@
1
- require 'rubygems'
2
- require 'nokogiri'
3
-
4
-
5
- class Droidband
6
- def self.generate_android_xml(n = "Baseband")
7
- puts "Writing layout.xml to : #{Dir.pwd}"
8
- doc = Nokogiri::HTML <<-EOHTML
9
- <html>
10
- <body>
11
- <item>
12
- <time>05.04.2011 9:53:23</time>
13
- <iddqd>42</iddqd>
14
- <idkfa>woot</idkfa>
15
- </item>
16
- </body>
17
- </html>
18
- EOHTML
19
-
20
- hammer = doc.at_css "time"
21
- hammer.name = n
22
- doc.css("iddqd").remove
23
- doc.css("idkfa").remove
24
-
25
- outfile = File.new("layout.xml", "w")
26
- outfile.puts doc.to_html
27
- outfile.close
28
- end
29
- end
30
-