• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

suculent / thinx-device-api / #252646970

27 Oct 2017 03:17PM UTC coverage: 12.466% (+1.3%) from 11.197%
#252646970

push

suculent
added support for displaying/exporting extended SigFox attributes

37 of 1808 branches covered (2.05%)

Branch coverage included in aggregate %.

735 of 4385 relevant lines covered (16.76%)

0.17 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.0
/lib/thinx/version.js
1
/** This THiNX-RTM API module is responsible for returning current app version. */
2

3
// Usage:
4
// require('./lib/thinx/version.js');
5
// var v = new Version();
6
// v.revision();
7

8
// Definitive Module Pattern
9
var Version = (function() {
1✔
10

11
        var app_config = require("../../conf/config.json");
1✔
12
        if (typeof(process.env.CIRCLE_USERNAME) !== "undefined") {
1!
13
                console.log("ยป Configuring for Circle CI...");
×
14
                app_config = require("../../conf/config-test.json");
×
15
        }
16

17
        // public
18
        var _public = {
1✔
19

20
                /**
21
                 * Returns current repository revision (development version)
22
                 * @return {string} App version (repository revision).
23
                 */
24

25
                revision: function() {
26
                        var exec = require("child_process");
1✔
27
                        var CMD = "cd " + app_config.project_root +
1✔
28
                                "; git rev-list HEAD --count";
29
                        var temp = exec.execSync(CMD).toString().replace("\n", "");
1✔
30
                        this.version = parseInt(temp);
1✔
31
                        return this.version;
1✔
32
                }
33
        };
34

35
        return _public;
1✔
36

37
})();
38

39
exports.revision = Version.revision;
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc