cxxproject_clangformat 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 65122bd26f83e06c6f22d6b3991bc0e6e4bd49eb
4
+ data.tar.gz: 42da8297a8fdb6b415366426e48c163edf7b57ac
5
+ SHA512:
6
+ metadata.gz: 16d636b046ca91dfad0f332bb457c3303c2f36f6c9515b5dd53d955bd7487406d16ed9ba06dcb64871b7ba38b943d2b4ee189c0a468c4e587c3a201952f1accd
7
+ data.tar.gz: eaa6a573dd95f7fedc51443071e52cdf928c33ed15fa96de3287c11c723cd7bf0d613c3459a0ff545b613408cf92245c0e68ef513f792b106eb511510658133e
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016 Christian Köstlin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,29 @@
1
+ # CxxprojectStats
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'cxxproject_stats'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install cxxproject_stats
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
@@ -0,0 +1,5 @@
1
+ require "cxxproject_clangformat/version"
2
+
3
+ module CxxprojectClangFormat
4
+ # Your code goes here...
5
+ end
@@ -0,0 +1,26 @@
1
+ cxx_plugin do |ruby_dsl, building_blocks, log|
2
+
3
+ def format_sources(bbs)
4
+ return bbs.inject(0) do |memo, bb|
5
+ memo += bb.sources.size if bb.kind_of?(Cxxproject::HasSources)
6
+ memo
7
+ end
8
+ end
9
+
10
+ desc 'print building block stats'
11
+ task :clang_format do
12
+ puts "clang_format"
13
+ building_blocks.each do |pair|
14
+ name = pair[0]
15
+ bb = pair[1]
16
+ puts name.class
17
+ puts bb.class
18
+ if bb.kind_of?(Cxxproject::HasSources)
19
+ bb.sources.each do |source|
20
+ f = File.join(bb.project_dir, source)
21
+ sh "clang-format -i #{f}"
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,3 @@
1
+ module CxxprojectClangFormat
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cxxproject_clangformat
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Christian Köstlin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-08-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: cxx
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: formats sources with clang-format
28
+ email:
29
+ - christian.koestlin@esrlabs.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - LICENSE
35
+ - README.md
36
+ - lib/cxxproject_clangformat.rb
37
+ - lib/cxxproject_clangformat/plugin.rb
38
+ - lib/cxxproject_clangformat/version.rb
39
+ homepage: http://marcmo.github.com/cxxproject/
40
+ licenses: []
41
+ metadata: {}
42
+ post_install_message:
43
+ rdoc_options: []
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ requirements: []
57
+ rubyforge_project:
58
+ rubygems_version: 2.5.1
59
+ signing_key:
60
+ specification_version: 4
61
+ summary: "..."
62
+ test_files: []