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 +4 -4
- data/README.md +8 -1
- data/examples/interactive.rb +11 -0
- data/lib/daslabs.rb +9 -3
- data/lib/daslabs/droidband.rb +30 -0
- data/lib/daslabs/version.rb +1 -1
- metadata +3 -2
- data/examples/output.html +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15ff8f2ec6455045027f4a080e03640b3e46cf7f
|
4
|
+
data.tar.gz: ce99eb1ceba173df766a99fc49d8fccf898fd1ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
7
|
-
|
6
|
+
def self.generate_html(n = "Default Name")
|
7
|
+
|
8
8
|
baseband = Baseband
|
9
|
-
Baseband.
|
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
|
+
|
data/lib/daslabs/version.rb
CHANGED
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.
|
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/
|
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