daslabs 0.6.0 → 0.7.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: f8a81ac51246b5ca67ce13e6640362a3df3f5904
4
- data.tar.gz: 6a139dc4507cae3e6c2803428279203abd018c1d
3
+ metadata.gz: 15ff8f2ec6455045027f4a080e03640b3e46cf7f
4
+ data.tar.gz: ce99eb1ceba173df766a99fc49d8fccf898fd1ab
5
5
  SHA512:
6
- metadata.gz: b04139b1a2d561f4ebedd5f7ee0347c211afbbfef320c12a24d2cb20ca669c6ccff1ca18c17b4e60e5782cd72612f2221cc52698b01aafb9386e05f89ac15601
7
- data.tar.gz: c37026926dd1d5a8d5df9c03b9282810738fe5c78e3d541a94818ec231110551990bf0ac93866f11ba1e713a50c92a827d5b6eb9865ac13f9c1d89478366cbfa
6
+ metadata.gz: 50d00c5aeb7d3ca9b7b9e85f256e6ca76c25afa19604b5632b7203f176ed8d73187607f4f91b375c59714b0b404c6e997ab94d96293363f8017cba736c0709ba
7
+ data.tar.gz: ed7b8c368be4f32a65336404d288629e1e5de4da1bde435c60bb9c6032319f715e2319c159e2e148623bb54ba73eea6fb66d0d809b06dd39d3ef618db2c534e1
data/README.md CHANGED
@@ -67,11 +67,18 @@ https://www.digitalocean.com/community/tutorials/how-to-package-and-distribute-r
67
67
 
68
68
  # Publishing
69
69
 
70
+ Make updates to gem
71
+
70
72
  Update VERSION in version.rb
71
73
 
72
- gem push daslabs-0.6.0.gem
74
+ ==> gem build daslabs.gemspec
75
+
76
+ ==> gem push daslabs-0.6.0.gem
73
77
 
74
78
 
75
79
  # Check version
76
80
 
77
81
  gem list
82
+
83
+
84
+ ==> bundler console
@@ -0,0 +1,11 @@
1
+ require 'tty-prompt'
2
+
3
+
4
+ prompt = TTY::Prompt.new
5
+ prompt.ask('Where shall we scaffold the Android app?', default: ENV['PWD'])
6
+
7
+ prompt.yes?('Would you like to populate the app with sample data?')
8
+
9
+
10
+ choices = %w(tabs sidemenu blank)
11
+ prompt.multi_select("What type of template would you like?", choices)
data/lib/daslabs.rb CHANGED
@@ -3,9 +3,15 @@ require "daslabs/version"
3
3
  require "daslabs/baseband"
4
4
 
5
5
  module DasLabs
6
- def self.hi(n = "Default Name")
7
- puts "Writing output.html to : #{Dir.pwd}"
6
+ def self.generate_html(n = "Default Name")
7
+
8
8
  baseband = Baseband
9
- Baseband.name(n)
9
+ Baseband.generate_html(n)
10
+ end
11
+
12
+ def self.generate_android_xml(n = "Default Name")
13
+
14
+ droidband = Droidband
15
+ Droidband.generate_android_xml(n)
10
16
  end
11
17
  end
@@ -0,0 +1,30 @@
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
+
@@ -1,3 +1,3 @@
1
1
  module Daslabs
2
- VERSION = "0.6.0"
2
+ VERSION = "0.7.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.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arunabh Das
@@ -70,10 +70,11 @@ files:
70
70
  - bin/console
71
71
  - bin/setup
72
72
  - daslabs.gemspec
73
- - examples/output.html
73
+ - examples/interactive.rb
74
74
  - examples/shell.rb
75
75
  - lib/daslabs.rb
76
76
  - lib/daslabs/baseband.rb
77
+ - lib/daslabs/droidband.rb
77
78
  - lib/daslabs/version.rb
78
79
  - vendor/cache/mini_portile2-2.3.0.gem
79
80
  - vendor/cache/nokogiri-1.8.2.gem
data/examples/output.html DELETED
@@ -1,10 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2
- <html>
3
- <body>
4
- <item>
5
- <Welcome to DasLabs>05.04.2011 9:53:23</Welcome to DasLabs>
6
-
7
-
8
- </item>
9
- </body>
10
- </html>