xembly 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +25 -0
- data/lib/xembly/version.rb +1 -1
- data/xembly.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29df4812f6cfbf4400568346dbf3009e31575c15
|
4
|
+
data.tar.gz: a0f01f35ff844ccb40761482ced502026c6a06e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e527295ed7feea2209226b8a3a9fb8fc0e744af05b693b3d1cbe46ef1ccfe72ee0ecf1b63792683aaf7bd9e541d682404e0223a9c2a5eb1f21b5669d814ad2fe
|
7
|
+
data.tar.gz: f4ecbb8c0a7b02bdfb5977ff132b68bdfa5da5f7c1c82f4b80fb828f2ff7cd6eea35508b94569d46b65f59ea65c72f759c54573a7fd2fc114738b6ad83ee7b55
|
data/README.md
CHANGED
@@ -30,3 +30,28 @@ Run it locally and read its output:
|
|
30
30
|
$ xembly --help
|
31
31
|
```
|
32
32
|
|
33
|
+
Say, you want to modify an existing XML document, which is
|
34
|
+
in file `doc.xml`:
|
35
|
+
|
36
|
+
```xml
|
37
|
+
<books>
|
38
|
+
<book isbn="0735619654">Object Thinking</book>
|
39
|
+
<book isbn="1519166915">Elegan Objects</book>
|
40
|
+
</books>
|
41
|
+
```
|
42
|
+
|
43
|
+
Now, say, you want to add one more book there:
|
44
|
+
|
45
|
+
```
|
46
|
+
$ xembly --xml doc.xml 'XPATH "/books"; ADD "book"; ATTR "isbn", "0201379430"; SET "Object Design";'
|
47
|
+
<books>
|
48
|
+
<book isbn="0735619654">Object Thinking</book>
|
49
|
+
<book isbn="1519166915">Elegan Objects</book>
|
50
|
+
<book isbn="0201379430">Object Design</book>
|
51
|
+
</books>
|
52
|
+
```
|
53
|
+
|
54
|
+
Simple as that!
|
55
|
+
|
56
|
+
Full specification of Xembly language is
|
57
|
+
[here](https://github.com/yegor256/xembly).
|
data/lib/xembly/version.rb
CHANGED
data/xembly.gemspec
CHANGED
@@ -46,7 +46,7 @@ Gem::Specification.new do |s|
|
|
46
46
|
s.extra_rdoc_files = ['README.md', 'LICENSE.txt']
|
47
47
|
s.add_runtime_dependency 'nokogiri', '1.6.7.2'
|
48
48
|
s.add_runtime_dependency 'slop', '4.3.0'
|
49
|
-
s.add_runtime_dependency 'rake', '
|
49
|
+
s.add_runtime_dependency 'rake', '11.1.1'
|
50
50
|
s.add_development_dependency 'coveralls', '0.7.2'
|
51
51
|
s.add_development_dependency 'rdoc', '4.2.0'
|
52
52
|
s.add_development_dependency 'cucumber', '1.3.17'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xembly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 11.1.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 11.1.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: coveralls
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|